openldap/MigrationTools-38-instdir.patch

422 lines
13 KiB
Diff
Raw Normal View History

We know where these scripts are going to be installed, so add the necessary
magic to let them be called from anywhere.
--- MigrationTools-38/migrate_all_netinfo_offline.sh Thu Jul 16 07:51:12 1998
+++ MigrationTools-38/migrate_all_netinfo_offline.sh Wed Jun 20 18:19:17 2001
@@ -38,6 +38,7 @@
PATH=$PATH:.
export PATH
+INSTDIR=/usr/share/openldap/migration/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -68,7 +69,7 @@
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
--- MigrationTools-38/migrate_all_netinfo_online.sh Thu Jul 16 07:51:12 1998
+++ MigrationTools-38/migrate_all_netinfo_online.sh Wed Jun 20 18:19:17 2001
@@ -38,6 +38,7 @@
PATH=$PATH:.
export PATH
+INSTDIR=/usr/share/openldap/migration/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -68,7 +69,7 @@
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
--- MigrationTools-38/migrate_all_nis_offline.sh Thu Jul 16 07:51:12 1998
+++ MigrationTools-38/migrate_all_nis_offline.sh Wed Jun 20 18:19:17 2001
@@ -38,6 +38,7 @@
PATH=$PATH:.
export PATH
+INSTDIR=/usr/share/openldap/migration/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -70,7 +71,7 @@
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
--- MigrationTools-38/migrate_all_nis_online.sh Thu Jul 16 07:51:12 1998
+++ MigrationTools-38/migrate_all_nis_online.sh Wed Jun 20 18:19:17 2001
@@ -38,7 +38,7 @@
PATH=$PATH:.
export PATH
-
+INSTDIR=/usr/share/openldap/migration/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -71,7 +71,7 @@
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
--- MigrationTools-38/migrate_all_nisplus_offline.sh Fri Feb 2 09:20:56 2001
+++ MigrationTools-38/migrate_all_nisplus_offline.sh Wed Jun 20 18:19:17 2001
@@ -38,6 +38,7 @@
PATH=$PATH:/usr/lib/nis:.
export PATH
+INSTDIR=/usr/share/openldap/migration/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -72,7 +73,7 @@
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
--- MigrationTools-38/migrate_all_nisplus_online.sh Fri Feb 2 09:20:56 2001
+++ MigrationTools-38/migrate_all_nisplus_online.sh Wed Jun 20 18:19:17 2001
@@ -38,7 +38,7 @@
PATH=$PATH:.
export PATH
-
+INSTDIR=/usr/share/openldap/migration/
TMPDIR="/tmp"
ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
@@ -73,7 +73,7 @@
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
--- MigrationTools-38/migrate_all_offline.sh Tue Oct 17 02:33:33 2000
+++ MigrationTools-38/migrate_all_offline.sh Wed Jun 20 18:19:17 2001
@@ -41,6 +41,7 @@
# Luke Howard <lukeh@padl.com> April 1997
#
+INSTDIR=/usr/share/openldap/migration/
DB="/tmp/nis.$$.ldif"
if [ "X$ETC_ALIASES" = "X" ]; then
@@ -108,32 +109,32 @@
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
--- MigrationTools-38/migrate_all_online.sh Sat Jan 6 22:39:20 2001
+++ MigrationTools-38/migrate_all_online.sh Wed Jun 20 18:19:17 2001
@@ -38,6 +38,8 @@
SHELL=/bin/sh
export SHELL
+INSTDIR=/usr/share/openldap/migration/
+
DB=/tmp/nis.$$.ldif
if [ "X$ETC_ALIASES" = "X" ]; then
@@ -104,7 +106,7 @@
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 "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..."
--- MigrationTools-38/migrate_aliases.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_aliases.pl Wed Jun 20 18:20:28 2001
@@ -36,7 +36,7 @@
# thanks to Dave McPike
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_aliases.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_automount.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_automount.pl Wed Jun 20 18:20:35 2001
@@ -33,7 +33,7 @@
# services migration tool
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_automount.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_base.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_base.pl Wed Jun 20 18:20:51 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_base.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_fstab.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_fstab.pl Wed Jun 20 18:20:57 2001
@@ -37,7 +37,7 @@
# They are used by MacOS X Server, however.
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_fstab.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_group.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_group.pl Wed Jun 20 18:21:01 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_group.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_hosts.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_hosts.pl Wed Jun 20 18:21:03 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_hosts.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_netgroup.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_netgroup.pl Wed Jun 20 18:21:06 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_netgroup.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_netgroup_byhost.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_netgroup_byhost.pl Wed Jun 20 18:21:09 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_netgroup_byhost.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_netgroup_byuser.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_netgroup_byuser.pl Wed Jun 20 18:21:12 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_netgroup_byuser.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_networks.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_networks.pl Wed Jun 20 18:21:14 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_networks.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_passwd.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_passwd.pl Wed Jun 20 18:21:16 2001
@@ -37,7 +37,7 @@
# Thanks to Peter Jacob Slot <peter@vision.auk.dk>.
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_passwd.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_profile.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_profile.pl Wed Jun 20 18:21:18 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_profile.pl";
--- MigrationTools-38/migrate_protocols.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_protocols.pl Wed Jun 20 18:21:21 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_protocols.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_rpc.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_rpc.pl Wed Jun 20 18:21:23 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_rpc.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_services.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_services.pl Wed Jun 20 18:21:25 2001
@@ -35,7 +35,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_services.pl";
$NAMINGCONTEXT = &getsuffix($PROGRAM);
--- MigrationTools-38/migrate_slapd_conf.pl Wed Jun 20 18:20:06 2001
+++ MigrationTools-38/migrate_slapd_conf.pl Wed Jun 20 18:21:29 2001
@@ -36,7 +36,7 @@
#
#
-require 'migrate_common.ph';
+require '/usr/share/openldap/migration/migrate_common.ph';
$PROGRAM = "migrate_slapd_conf.pl";