Blob Blame History Raw
Allow the calling user to pass in arguments to ldapadd/ldapmodify.

diff -up MigrationTools-47/migrate_all_netinfo_offline.sh.patch3 MigrationTools-47/migrate_all_netinfo_offline.sh
--- MigrationTools-47/migrate_all_netinfo_offline.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_netinfo_offline.sh	2008-08-29 09:09:19.000000000 +0200
@@ -69,7 +69,7 @@ nidump hosts $DOM > $ETC_HOSTS
 nidump networks $DOM > $ETC_NETWORKS
 nidump aliases $DOM > $ETC_ALIASES
 
-. ${INSTDIR}migrate_all_offline.sh
+. ${INSTDIR}migrate_all_offline.sh "$@"
 
 rm -f $ETC_PASSWD
 rm -f $ETC_GROUP
diff -up MigrationTools-47/migrate_all_netinfo_online.sh.patch3 MigrationTools-47/migrate_all_netinfo_online.sh
--- MigrationTools-47/migrate_all_netinfo_online.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_netinfo_online.sh	2008-08-29 09:09:19.000000000 +0200
@@ -69,7 +69,7 @@ nidump hosts $DOM > $ETC_HOSTS
 nidump networks $DOM > $ETC_NETWORKS
 nidump aliases $DOM > $ETC_ALIASES
 
-. ${INSTDIR}migrate_all_online.sh
+. ${INSTDIR}migrate_all_online.sh "$@"
 
 rm -f $ETC_PASSWD
 rm -f $ETC_GROUP
diff -up MigrationTools-47/migrate_all_nis_offline.sh.patch3 MigrationTools-47/migrate_all_nis_offline.sh
--- MigrationTools-47/migrate_all_nis_offline.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_nis_offline.sh	2008-08-29 09:09:19.000000000 +0200
@@ -71,7 +71,7 @@ ypcat $DOMFLAG hosts > $ETC_HOSTS
 ypcat $DOMFLAG networks > $ETC_NETWORKS
 #ypcat $DOMFLAG -k aliases > $ETC_ALIASES
 
-. ${INSTDIR}migrate_all_offline.sh
+. ${INSTDIR}migrate_all_offline.sh "$@"
 
 rm -f $ETC_PASSWD
 rm -f $ETC_GROUP
diff -up MigrationTools-47/migrate_all_nis_online.sh.patch3 MigrationTools-47/migrate_all_nis_online.sh
--- MigrationTools-47/migrate_all_nis_online.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_nis_online.sh	2008-08-29 09:09:19.000000000 +0200
@@ -71,7 +71,7 @@ ypcat $DOMFLAG hosts > $ETC_HOSTS
 ypcat $DOMFLAG networks > $ETC_NETWORKS
 #ypcat $DOMFLAG -k aliases > $ETC_ALIASES
 
-. ${INSTDIR}migrate_all_online.sh
+. ${INSTDIR}migrate_all_online.sh "$@"
 
 rm -f $ETC_PASSWD
 rm -f $ETC_GROUP
diff -up MigrationTools-47/migrate_all_nisplus_offline.sh.patch3 MigrationTools-47/migrate_all_nisplus_offline.sh
--- MigrationTools-47/migrate_all_nisplus_offline.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_nisplus_offline.sh	2008-08-29 09:09:19.000000000 +0200
@@ -73,7 +73,7 @@ nisaddent -d networks $DOM > $ETC_NETWOR
 nisaddent -d netgroup $DOM > $ETC_NETGROUP
 niscat mail_aliases.org_dir.$DOM > $ETC_ALIASES
 
-. ${INSTDIR}migrate_all_offline.sh
+. ${INSTDIR}migrate_all_offline.sh "$@"
 
 rm -f $ETC_PASSWD
 rm -f $ETC_GROUP
diff -up MigrationTools-47/migrate_all_nisplus_online.sh.patch3 MigrationTools-47/migrate_all_nisplus_online.sh
--- MigrationTools-47/migrate_all_nisplus_online.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_nisplus_online.sh	2008-08-29 09:09:19.000000000 +0200
@@ -73,7 +73,7 @@ nisaddent -d networks $DOM > $ETC_NETWOR
 nisaddent -d netgroup $DOM > $ETC_NETGROUP
 niscat mail_aliases.org_dir.$DOM > $ETC_ALIASES
 
-. ${INSTDIR}migrate_all_online.sh
+. ${INSTDIR}migrate_all_online.sh "$@"
 
 rm -f $ETC_PASSWD
 rm -f $ETC_GROUP
diff -up MigrationTools-47/migrate_all_offline.sh.patch3 MigrationTools-47/migrate_all_offline.sh
--- MigrationTools-47/migrate_all_offline.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_offline.sh	2008-08-29 09:09:19.000000000 +0200
@@ -137,9 +137,9 @@ echo "Migrating netgroups (by host)..."
 $PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byhost.pl	$ETC_NETGROUP >> $DB
 echo "Preparing LDAP database..."
 if [ "X$SLAPADD" = "X" ]; then
-	$LDIF2LDBM -i $DB
+	$LDIF2LDBM -i $DB "$@"
 else
-	$SLAPADD -l $DB
+	$SLAPADD -l $DB "$@"
 fi
 EXITCODE=$?
 
diff -up MigrationTools-47/migrate_all_online.sh.patch3 MigrationTools-47/migrate_all_online.sh
--- MigrationTools-47/migrate_all_online.sh.patch3	2008-08-29 09:09:19.000000000 +0200
+++ MigrationTools-47/migrate_all_online.sh	2008-08-29 09:09:19.000000000 +0200
@@ -194,13 +194,11 @@ $PERL -I${INSTDIR} ${INSTDIR}migrate_net
 
 echo "Importing into LDAP..."
 
- if [ -x /usr/sbin/slapadd ]; then
-   $LDAPADD -x -h $LDAPHOST -D "$LDAP_BINDDN" -w "$LDAP_BINDCRED" -f $DB
- elif [ -x /usr/local/sbin/slapadd ]; then
-   $LDAPADD -x -h $LDAPHOST -D "$LDAP_BINDDN" -w "$LDAP_BINDCRED" -f $DB
- else
-   $LDAPADD -h $LDAPHOST -D "$LDAP_BINDDN" -w "$LDAP_BINDCRED" -f $DB
- fi
+if [ `basename $LDAPADD` = "slapadd" ]; then
+	$LDAPADD -h $LDAPHOST -D "$LDAP_BINDDN" -w "$LDAP_BINDCRED" "$@" -f $DB
+else
+	$LDAPADD -x -h $LDAPHOST -D "$LDAP_BINDDN" -w "$LDAP_BINDCRED" "$@" -f $DB
+fi
 
 if [ $? -ne 0 ]; then
 	echo "$LDAPADD: returned non-zero exit status: saving failed LDIF to $DB"