|
|
e96fd1 |
Use mktemp to generate temporary files.
|
|
|
e96fd1 |
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_netinfo_offline.sh.patch2 MigrationTools-47/migrate_all_netinfo_offline.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_netinfo_offline.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_netinfo_offline.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -41,15 +41,15 @@ export PATH
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
TMPDIR="/tmp"
|
|
|
e96fd1 |
-ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
|
|
|
e96fd1 |
-ETC_GROUP="$TMPDIR/group.$$.ldap"
|
|
|
e96fd1 |
-ETC_SERVICES="$TMPDIR/services.$$.ldap"
|
|
|
e96fd1 |
-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap"
|
|
|
e96fd1 |
-ETC_FSTAB="$TMPDIR/fstab.$$.ldap"
|
|
|
e96fd1 |
-ETC_RPC="$TMPDIR/rpc.$$.ldap"
|
|
|
e96fd1 |
-ETC_HOSTS="$TMPDIR/hosts.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETWORKS="$TMPDIR/networks.$$.ldap"
|
|
|
e96fd1 |
-ETC_ALIASES="$TMPDIR/aliases.$$.ldap"
|
|
|
e96fd1 |
+ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX`
|
|
|
e96fd1 |
EXIT=no
|
|
|
e96fd1 |
|
|
|
e96fd1 |
question="Enter the NetInfo domain to import from [/]:"
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_netinfo_online.sh.patch2 MigrationTools-47/migrate_all_netinfo_online.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_netinfo_online.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_netinfo_online.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -41,15 +41,15 @@ export PATH
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
TMPDIR="/tmp"
|
|
|
e96fd1 |
-ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
|
|
|
e96fd1 |
-ETC_GROUP="$TMPDIR/group.$$.ldap"
|
|
|
e96fd1 |
-ETC_SERVICES="$TMPDIR/services.$$.ldap"
|
|
|
e96fd1 |
-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap"
|
|
|
e96fd1 |
-ETC_FSTAB="$TMPDIR/fstab.$$.ldap"
|
|
|
e96fd1 |
-ETC_RPC="$TMPDIR/rpc.$$.ldap"
|
|
|
e96fd1 |
-ETC_HOSTS="$TMPDIR/hosts.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETWORKS="$TMPDIR/networks.$$.ldap"
|
|
|
e96fd1 |
-ETC_ALIASES="$TMPDIR/aliases.$$.ldap"
|
|
|
e96fd1 |
+ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX`
|
|
|
e96fd1 |
EXIT=no
|
|
|
e96fd1 |
|
|
|
e96fd1 |
question="Enter the NetInfo domain to import from [/]:"
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_nis_offline.sh.patch2 MigrationTools-47/migrate_all_nis_offline.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_nis_offline.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_nis_offline.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -41,15 +41,15 @@ export PATH
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
TMPDIR="/tmp"
|
|
|
e96fd1 |
-ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
|
|
|
e96fd1 |
-ETC_GROUP="$TMPDIR/group.$$.ldap"
|
|
|
e96fd1 |
-ETC_SERVICES="$TMPDIR/services.$$.ldap"
|
|
|
e96fd1 |
-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap"
|
|
|
e96fd1 |
-ETC_FSTAB="$TMPDIR/fstab.$$.ldap"
|
|
|
e96fd1 |
-ETC_RPC="$TMPDIR/rpc.$$.ldap"
|
|
|
e96fd1 |
-ETC_HOSTS="$TMPDIR/hosts.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETWORKS="$TMPDIR/networks.$$.ldap"
|
|
|
e96fd1 |
-ETC_ALIASES="$TMPDIR/aliases.$$.ldap"
|
|
|
e96fd1 |
+ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX`
|
|
|
e96fd1 |
EXIT=no
|
|
|
e96fd1 |
|
|
|
e96fd1 |
question="Enter the NIS domain to import from (optional): "
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_nis_online.sh.patch2 MigrationTools-47/migrate_all_nis_online.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_nis_online.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_nis_online.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -41,15 +41,15 @@ export PATH
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
TMPDIR="/tmp"
|
|
|
e96fd1 |
-ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
|
|
|
e96fd1 |
-ETC_GROUP="$TMPDIR/group.$$.ldap"
|
|
|
e96fd1 |
-ETC_SERVICES="$TMPDIR/services.$$.ldap"
|
|
|
e96fd1 |
-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap"
|
|
|
e96fd1 |
-ETC_FSTAB="$TMPDIR/fstab.$$.ldap"
|
|
|
e96fd1 |
-ETC_RPC="$TMPDIR/rpc.$$.ldap"
|
|
|
e96fd1 |
-ETC_HOSTS="$TMPDIR/hosts.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETWORKS="$TMPDIR/networks.$$.ldap"
|
|
|
e96fd1 |
-ETC_ALIASES="$TMPDIR/aliases.$$.ldap"
|
|
|
e96fd1 |
+ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX`
|
|
|
e96fd1 |
EXIT=no
|
|
|
e96fd1 |
|
|
|
e96fd1 |
question="Enter the NIS domain to import from (optional): "
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_nisplus_offline.sh.patch2 MigrationTools-47/migrate_all_nisplus_offline.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_nisplus_offline.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_nisplus_offline.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -41,16 +41,16 @@ export PATH
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
TMPDIR="/tmp"
|
|
|
e96fd1 |
-ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
|
|
|
e96fd1 |
-ETC_GROUP="$TMPDIR/group.$$.ldap"
|
|
|
e96fd1 |
-ETC_SERVICES="$TMPDIR/services.$$.ldap"
|
|
|
e96fd1 |
-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap"
|
|
|
e96fd1 |
-ETC_FSTAB="$TMPDIR/fstab.$$.ldap"
|
|
|
e96fd1 |
-ETC_RPC="$TMPDIR/rpc.$$.ldap"
|
|
|
e96fd1 |
-ETC_HOSTS="$TMPDIR/hosts.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETWORKS="$TMPDIR/networks.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETGROUP="$TMPDIR/netgroup.$$.ldap"
|
|
|
e96fd1 |
-ETC_ALIASES="$TMPDIR/aliases.$$.ldap"
|
|
|
e96fd1 |
+ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETGROUP=`mktemp $TMPDIR/netgroup.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX`
|
|
|
e96fd1 |
EXIT=no
|
|
|
e96fd1 |
|
|
|
e96fd1 |
question="Enter the NIS+ domain to import from (optional): "
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_nisplus_online.sh.patch2 MigrationTools-47/migrate_all_nisplus_online.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_nisplus_online.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_nisplus_online.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -41,16 +41,16 @@ export PATH
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
TMPDIR="/tmp"
|
|
|
e96fd1 |
-ETC_PASSWD="$TMPDIR/passwd.$$.ldap"
|
|
|
e96fd1 |
-ETC_GROUP="$TMPDIR/group.$$.ldap"
|
|
|
e96fd1 |
-ETC_SERVICES="$TMPDIR/services.$$.ldap"
|
|
|
e96fd1 |
-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap"
|
|
|
e96fd1 |
-ETC_FSTAB="$TMPDIR/fstab.$$.ldap"
|
|
|
e96fd1 |
-ETC_RPC="$TMPDIR/rpc.$$.ldap"
|
|
|
e96fd1 |
-ETC_HOSTS="$TMPDIR/hosts.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETWORKS="$TMPDIR/networks.$$.ldap"
|
|
|
e96fd1 |
-ETC_NETGROUP="$TMPDIR/netgroup.$$.ldap"
|
|
|
e96fd1 |
-ETC_ALIASES="$TMPDIR/aliases.$$.ldap"
|
|
|
e96fd1 |
+ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_NETGROUP=`mktemp $TMPDIR/netgroup.ldap.XXXXXX`
|
|
|
e96fd1 |
+ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX`
|
|
|
e96fd1 |
EXIT=no
|
|
|
e96fd1 |
|
|
|
e96fd1 |
question="Enter the NIS+ domain to import from (optional): "
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_offline.sh.patch2 MigrationTools-47/migrate_all_offline.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_offline.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_offline.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -42,7 +42,7 @@
|
|
|
e96fd1 |
#
|
|
|
e96fd1 |
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
-DB="/tmp/nis.$$.ldif"
|
|
|
e96fd1 |
+DB=`mktemp /tmp/nis.ldif.XXXXXX`
|
|
|
e96fd1 |
|
|
|
e96fd1 |
if [ "X$ETC_ALIASES" = "X" ]; then
|
|
|
e96fd1 |
ETC_ALIASES=/etc/aliases
|
|
|
e96fd1 |
diff -up MigrationTools-47/migrate_all_online.sh.patch2 MigrationTools-47/migrate_all_online.sh
|
|
|
e96fd1 |
--- MigrationTools-47/migrate_all_online.sh.patch2 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
+++ MigrationTools-47/migrate_all_online.sh 2008-08-29 09:09:19.000000000 +0200
|
|
|
e96fd1 |
@@ -40,7 +40,7 @@ export SHELL
|
|
|
e96fd1 |
|
|
|
e96fd1 |
INSTDIR=/usr/share/migrationtools/
|
|
|
e96fd1 |
|
|
|
e96fd1 |
-DB=/tmp/nis.$$.ldif
|
|
|
e96fd1 |
+DB=`mktemp /tmp/nis.ldif.XXXXXX`
|
|
|
e96fd1 |
|
|
|
e96fd1 |
if [ "X$ETC_ALIASES" = "X" ]; then
|
|
|
e96fd1 |
ETC_ALIASES=/etc/aliases
|