We know where these scripts are going to be installed, so add the necessary
magic to let them be called from anywhere.
diff -up MigrationTools-47/migrate_aliases.pl.patch1 MigrationTools-47/migrate_aliases.pl
--- MigrationTools-47/migrate_aliases.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_aliases.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
# thanks to Dave McPike
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_aliases.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_all_netinfo_offline.sh.patch1 MigrationTools-47/migrate_all_netinfo_offline.sh
--- MigrationTools-47/migrate_all_netinfo_offline.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_netinfo_offline.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,6 +38,7 @@
PATH=$PATH:.
export PATH
+INSTDIR=/usr/share/migrationtools/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -68,7 +69,7 @@ nidump hosts $DOM > $ETC_HOSTS
nidump networks $DOM > $ETC_NETWORKS
nidump aliases $DOM > $ETC_ALIASES
-. 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.patch1 MigrationTools-47/migrate_all_netinfo_online.sh
--- MigrationTools-47/migrate_all_netinfo_online.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_netinfo_online.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,6 +38,7 @@
PATH=$PATH:.
export PATH
+INSTDIR=/usr/share/migrationtools/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -68,7 +69,7 @@ nidump hosts $DOM > $ETC_HOSTS
nidump networks $DOM > $ETC_NETWORKS
nidump aliases $DOM > $ETC_ALIASES
-. 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.patch1 MigrationTools-47/migrate_all_nis_offline.sh
--- MigrationTools-47/migrate_all_nis_offline.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_nis_offline.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,6 +38,7 @@
PATH=$PATH:.
export PATH
+INSTDIR=/usr/share/migrationtools/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -70,7 +71,7 @@ ypcat $DOMFLAG hosts > $ETC_HOSTS
ypcat $DOMFLAG networks > $ETC_NETWORKS
#ypcat $DOMFLAG -k aliases > $ETC_ALIASES
-. 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.patch1 MigrationTools-47/migrate_all_nis_online.sh
--- MigrationTools-47/migrate_all_nis_online.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_nis_online.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,7 +38,7 @@
PATH=$PATH:.
export PATH
-
+INSTDIR=/usr/share/migrationtools/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -71,7 +71,7 @@ ypcat $DOMFLAG hosts > $ETC_HOSTS
ypcat $DOMFLAG networks > $ETC_NETWORKS
#ypcat $DOMFLAG -k aliases > $ETC_ALIASES
-. 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.patch1 MigrationTools-47/migrate_all_nisplus_offline.sh
--- MigrationTools-47/migrate_all_nisplus_offline.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_nisplus_offline.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,6 +38,7 @@
PATH=$PATH:/usr/lib/nis:.
export PATH
+INSTDIR=/usr/share/migrationtools/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -72,7 +73,7 @@ nisaddent -d networks $DOM > $ETC_NETWOR
nisaddent -d netgroup $DOM > $ETC_NETGROUP
niscat mail_aliases.org_dir.$DOM > $ETC_ALIASES
-. 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.patch1 MigrationTools-47/migrate_all_nisplus_online.sh
--- MigrationTools-47/migrate_all_nisplus_online.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_nisplus_online.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,7 +38,7 @@
PATH=$PATH:.
export PATH
-
+INSTDIR=/usr/share/migrationtools/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -73,7 +73,7 @@ nisaddent -d networks $DOM > $ETC_NETWOR
nisaddent -d netgroup $DOM > $ETC_NETGROUP
niscat mail_aliases.org_dir.$DOM > $ETC_ALIASES
-. 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.patch1 MigrationTools-47/migrate_all_offline.sh
--- MigrationTools-47/migrate_all_offline.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_offline.sh 2008-08-29 09:09:19.000000000 +0200
@@ -41,6 +41,7 @@
# Luke Howard <lukeh@padl.com> April 1997
#
+INSTDIR=/usr/share/migrationtools/
DB="/tmp/nis.$$.ldif"
if [ "X$ETC_ALIASES" = "X" ]; then
@@ -108,32 +109,32 @@ if [ "X$LDIF2LDBM" = "X" ]; then
fi
echo "Creating naming context entries..."
-$PERL migrate_base.pl > $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_base.pl > $DB
echo "Migrating aliases..."
-$PERL migrate_aliases.pl $ETC_ALIASES >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_aliases.pl $ETC_ALIASES >> $DB
#echo "Migrating fstab..."
-#$PERL migrate_fstab.pl $ETC_FSTAB >> $DB
+#$PERL -I${INSTDIR} ${INSTDIR}migrate_fstab.pl $ETC_FSTAB >> $DB
echo "Migrating groups..."
-$PERL migrate_group.pl $ETC_GROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_group.pl $ETC_GROUP >> $DB
echo "Migrating hosts..."
-$PERL migrate_hosts.pl $ETC_HOSTS >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_hosts.pl $ETC_HOSTS >> $DB
echo "Migrating networks..."
-$PERL migrate_networks.pl $ETC_NETWORKS >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_networks.pl $ETC_NETWORKS >> $DB
echo "Migrating users..."
-$PERL migrate_passwd.pl $ETC_PASSWD >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_passwd.pl $ETC_PASSWD >> $DB
echo "Migrating protocols..."
-$PERL migrate_protocols.pl $ETC_PROTOCOLS >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_protocols.pl $ETC_PROTOCOLS >> $DB
echo "Migrating rpcs..."
-$PERL migrate_rpc.pl $ETC_RPC >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_rpc.pl $ETC_RPC >> $DB
echo "Migrating services..."
-$PERL migrate_services.pl $ETC_SERVICES >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_services.pl $ETC_SERVICES >> $DB
echo "Migrating netgroups..."
-$PERL migrate_netgroup.pl $ETC_NETGROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup.pl $ETC_NETGROUP >> $DB
echo "Importing into LDAP..."
echo "Migrating netgroups (by user)..."
-$PERL migrate_netgroup_byuser.pl $ETC_NETGROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byuser.pl $ETC_NETGROUP >> $DB
echo "Migrating netgroups (by host)..."
-$PERL migrate_netgroup_byhost.pl $ETC_NETGROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byhost.pl $ETC_NETGROUP >> $DB
echo "Preparing LDAP database..."
if [ "X$SLAPADD" = "X" ]; then
$LDIF2LDBM -i $DB
diff -up MigrationTools-47/migrate_all_online.sh.patch1 MigrationTools-47/migrate_all_online.sh
--- MigrationTools-47/migrate_all_online.sh.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_all_online.sh 2008-08-29 09:09:19.000000000 +0200
@@ -38,6 +38,8 @@
SHELL=/bin/sh
export SHELL
+INSTDIR=/usr/share/migrationtools/
+
DB=/tmp/nis.$$.ldif
if [ "X$ETC_ALIASES" = "X" ]; then
@@ -104,7 +106,7 @@ if [ "X$PERL" = "X" ]; then
fi
if [ "X$LDAP_BASEDN" = "X" ]; then
- defaultcontext=`$PERL -e 'require "migrate_common.ph"; print \$DEFAULT_BASE';`
+ defaultcontext=`$PERL -I${INSTDIR} -e 'require "'${INSTDIR}migrate_common.ph'"; print \$DEFAULT_BASE';`
question="Enter the X.500 naming context you wish to import into: [$defaultcontext]"
echo "$question " | tr -d '\012' > /dev/tty
read LDAP_BASEDN
@@ -160,35 +162,35 @@ echo
echo "Importing into $LDAP_BASEDN..."
echo
echo "Creating naming context entries..."
-$PERL migrate_base.pl -n > $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_base.pl -n > $DB
if [ "X$LDAP_PROFILE" = "Xyes" ]; then
echo "Creating DUAConfigProfile entry..."
- $PERL migrate_profile.pl "$LDAPHOST" >> $DB
+ $PERL -I${INSTDIR} ${INSTDIR}migrate_profile.pl "$LDAPHOST" >> $DB
fi
echo "Migrating aliases..."
-$PERL migrate_aliases.pl $ETC_ALIASES >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_aliases.pl $ETC_ALIASES >> $DB
#echo "Migrating fstab..."
-#$PERL migrate_fstab.pl $ETC_FSTAB >> $DB
+#$PERL -I${INSTDIR} ${INSTDIR}migrate_fstab.pl $ETC_FSTAB >> $DB
echo "Migrating groups..."
-$PERL migrate_group.pl $ETC_GROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_group.pl $ETC_GROUP >> $DB
echo "Migrating hosts..."
-$PERL migrate_hosts.pl $ETC_HOSTS >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_hosts.pl $ETC_HOSTS >> $DB
echo "Migrating networks..."
-$PERL migrate_networks.pl $ETC_NETWORKS >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_networks.pl $ETC_NETWORKS >> $DB
echo "Migrating users..."
-$PERL migrate_passwd.pl $ETC_PASSWD >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_passwd.pl $ETC_PASSWD >> $DB
echo "Migrating protocols..."
-$PERL migrate_protocols.pl $ETC_PROTOCOLS >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_protocols.pl $ETC_PROTOCOLS >> $DB
echo "Migrating rpcs..."
-$PERL migrate_rpc.pl $ETC_RPC >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_rpc.pl $ETC_RPC >> $DB
echo "Migrating services..."
-$PERL migrate_services.pl $ETC_SERVICES >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_services.pl $ETC_SERVICES >> $DB
echo "Migrating netgroups..."
-$PERL migrate_netgroup.pl $ETC_NETGROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup.pl $ETC_NETGROUP >> $DB
echo "Migrating netgroups (by user)..."
-$PERL migrate_netgroup_byuser.pl $ETC_NETGROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byuser.pl $ETC_NETGROUP >> $DB
echo "Migrating netgroups (by host)..."
-$PERL migrate_netgroup_byhost.pl $ETC_NETGROUP >> $DB
+$PERL -I${INSTDIR} ${INSTDIR}migrate_netgroup_byhost.pl $ETC_NETGROUP >> $DB
echo "Importing into LDAP..."
diff -up MigrationTools-47/migrate_automount.pl.patch1 MigrationTools-47/migrate_automount.pl
--- MigrationTools-47/migrate_automount.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_automount.pl 2008-08-29 09:09:19.000000000 +0200
@@ -33,7 +33,7 @@
# services migration tool
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_automount.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_base.pl.patch1 MigrationTools-47/migrate_base.pl
--- MigrationTools-47/migrate_base.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_base.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_base.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_fstab.pl.patch1 MigrationTools-47/migrate_fstab.pl
--- MigrationTools-47/migrate_fstab.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_fstab.pl 2008-08-29 09:09:19.000000000 +0200
@@ -37,7 +37,7 @@
# They are used by MacOS X Server, however.
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_fstab.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_group.pl.patch1 MigrationTools-47/migrate_group.pl
--- MigrationTools-47/migrate_group.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_group.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_group.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_hosts.pl.patch1 MigrationTools-47/migrate_hosts.pl
--- MigrationTools-47/migrate_hosts.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_hosts.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_hosts.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_netgroup_byhost.pl.patch1 MigrationTools-47/migrate_netgroup_byhost.pl
--- MigrationTools-47/migrate_netgroup_byhost.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_netgroup_byhost.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_netgroup_byhost.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_netgroup_byuser.pl.patch1 MigrationTools-47/migrate_netgroup_byuser.pl
--- MigrationTools-47/migrate_netgroup_byuser.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_netgroup_byuser.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_netgroup_byuser.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_netgroup.pl.patch1 MigrationTools-47/migrate_netgroup.pl
--- MigrationTools-47/migrate_netgroup.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_netgroup.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
# line continuation support by Bob Apthorpe
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_netgroup.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_networks.pl.patch1 MigrationTools-47/migrate_networks.pl
--- MigrationTools-47/migrate_networks.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_networks.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_networks.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_passwd.pl.patch1 MigrationTools-47/migrate_passwd.pl
--- MigrationTools-47/migrate_passwd.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_passwd.pl 2008-08-29 09:09:19.000000000 +0200
@@ -37,7 +37,7 @@
# Thanks to Peter Jacob Slot <peter@vision.auk.dk>.
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_passwd.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_profile.pl.patch1 MigrationTools-47/migrate_profile.pl
--- MigrationTools-47/migrate_profile.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_profile.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_profile.pl";
diff -up MigrationTools-47/migrate_protocols.pl.patch1 MigrationTools-47/migrate_protocols.pl
--- MigrationTools-47/migrate_protocols.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_protocols.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_protocols.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_rpc.pl.patch1 MigrationTools-47/migrate_rpc.pl
--- MigrationTools-47/migrate_rpc.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_rpc.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_rpc.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_services.pl.patch1 MigrationTools-47/migrate_services.pl
--- MigrationTools-47/migrate_services.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_services.pl 2008-08-29 09:09:19.000000000 +0200
@@ -37,7 +37,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_services.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
diff -up MigrationTools-47/migrate_slapd_conf.pl.patch1 MigrationTools-47/migrate_slapd_conf.pl
--- MigrationTools-47/migrate_slapd_conf.pl.patch1 2006-01-25 05:18:16.000000000 +0100
+++ MigrationTools-47/migrate_slapd_conf.pl 2008-08-29 09:09:19.000000000 +0200
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/migrationtools/migrate_common.ph';
$PROGRAM = "migrate_slapd_conf.pl";