]> git.pld-linux.org Git - packages/MigrationTools.git/blob - MigrationTools-suffix.patch
- drop obsolete and outdated manual inclusion of rpm macros
[packages/MigrationTools.git] / MigrationTools-suffix.patch
1 Try adding the top-level object, which may be missing, but don't worry if
2 the add operation fails.
3 --- MigrationTools-26/migrate_all_online.sh     Wed Oct 25 16:27:02 2000
4 +++ MigrationTools-26/migrate_all_online.sh     Wed Oct 25 16:30:11 2000
5 @@ -179,5 +179,31 @@
6  echo "Migrating netgroups (by host)..."
7  $PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byhost.pl        $ETC_NETGROUP >> $DB
8  
9 +# Try to add the top-level object, because it's frequently missing.
10 +NAMINGATTRNAME=`echo $LDAP_BASEDN | cut -f1 -d=`
11 +NAMINGATTRVALUE=`echo $LDAP_BASEDN | cut -f1 -d, | cut -f2 -d=`
12 +OBJECTCLASS=
13 +case "$NAMINGATTRNAME" in
14 +       dc)         OBJECTCLASS=domain;;
15 +       o)          OBJECTCLASS=organization;;
16 +       l)          OBJECTCLASS=locality;;
17 +       c)          OBJECTCLASS=country;;
18 +       nismapname) OBJECTCLASS=nisMap;;
19 +       cn)         OBJECTCLASS=container;;
20 +esac
21 +
22 +if test -n "$NAMINGATTRNAME" ; then
23 +if test -n "$NAMINGATTRVALUE" ; then
24 +if test -n "$OBJECTCLASS" ; then
25 +cat << EOF | $LDAPADD -h $LDAPHOST -D "$LDAP_BINDDN" -x -w "$LDAP_BINDCRED"
26 +dn: $LDAP_BASEDN
27 +$NAMINGATTRNAME: $NAMINGATTRVALUE
28 +objectClass: top
29 +objectClass: $OBJECTCLASS
30 +EOF
31 +fi
32 +fi
33 +fi
34 +
35  echo "Importing into LDAP..."
36  
This page took 0.042495 seconds and 3 git commands to generate.