Use mktemp to generate temporary files. --- MigrationTools-36/migrate_all_netinfo_offline.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_netinfo_offline.sh Mon Feb 5 11:39:14 2001 @@ -41,15 +41,15 @@ INSTDIR=/usr/share/openldap/migration/ TMPDIR="/tmp" -ETC_PASSWD="$TMPDIR/passwd.$$.ldap" -ETC_GROUP="$TMPDIR/group.$$.ldap" -ETC_SERVICES="$TMPDIR/services.$$.ldap" -ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" -ETC_FSTAB="$TMPDIR/fstab.$$.ldap" -ETC_RPC="$TMPDIR/rpc.$$.ldap" -ETC_HOSTS="$TMPDIR/hosts.$$.ldap" -ETC_NETWORKS="$TMPDIR/networks.$$.ldap" -ETC_ALIASES="$TMPDIR/aliases.$$.ldap" +ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX` +ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX` +ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX` +ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX` +ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX` +ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX` +ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX` +ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX` +ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX` EXIT=no question="Enter the NetInfo domain to import from [/]:" --- MigrationTools-36/migrate_all_netinfo_online.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_netinfo_online.sh Mon Feb 5 11:39:14 2001 @@ -41,15 +41,15 @@ INSTDIR=/usr/share/openldap/migration/ TMPDIR="/tmp" -ETC_PASSWD="$TMPDIR/passwd.$$.ldap" -ETC_GROUP="$TMPDIR/group.$$.ldap" -ETC_SERVICES="$TMPDIR/services.$$.ldap" -ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" -ETC_FSTAB="$TMPDIR/fstab.$$.ldap" -ETC_RPC="$TMPDIR/rpc.$$.ldap" -ETC_HOSTS="$TMPDIR/hosts.$$.ldap" -ETC_NETWORKS="$TMPDIR/networks.$$.ldap" -ETC_ALIASES="$TMPDIR/aliases.$$.ldap" +ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX` +ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX` +ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX` +ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX` +ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX` +ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX` +ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX` +ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX` +ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX` EXIT=no question="Enter the NetInfo domain to import from [/]:" --- MigrationTools-36/migrate_all_nisplus_offline.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_nisplus_offline.sh Mon Feb 5 11:43:23 2001 @@ -41,16 +41,16 @@ INSTDIR=/usr/share/openldap/migration/ TMPDIR="/tmp" -ETC_PASSWD="$TMPDIR/passwd.$$.ldap" -ETC_GROUP="$TMPDIR/group.$$.ldap" -ETC_SERVICES="$TMPDIR/services.$$.ldap" -ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" -ETC_FSTAB="$TMPDIR/fstab.$$.ldap" -ETC_RPC="$TMPDIR/rpc.$$.ldap" -ETC_HOSTS="$TMPDIR/hosts.$$.ldap" -ETC_NETWORKS="$TMPDIR/networks.$$.ldap" -ETC_NETGROUP="$TMPDIR/netgroup.$$.ldap" -ETC_ALIASES="$TMPDIR/aliases.$$.ldap" +ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX` +ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX` +ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX` +ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX` +ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX` +ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX` +ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX` +ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX` +ETC_NETGROUP=`mktemp $TMPDIR/netgroup.ldap.XXXXXX` +ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX` EXIT=no question="Enter the NIS+ domain to import from (optional): " --- MigrationTools-36/migrate_all_nisplus_online.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_nisplus_online.sh Mon Feb 5 11:45:18 2001 @@ -41,16 +41,16 @@ INSTDIR=/usr/share/openldap/migration/ TMPDIR="/tmp" -ETC_PASSWD="$TMPDIR/passwd.$$.ldap" -ETC_GROUP="$TMPDIR/group.$$.ldap" -ETC_SERVICES="$TMPDIR/services.$$.ldap" -ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" -ETC_FSTAB="$TMPDIR/fstab.$$.ldap" -ETC_RPC="$TMPDIR/rpc.$$.ldap" -ETC_HOSTS="$TMPDIR/hosts.$$.ldap" -ETC_NETWORKS="$TMPDIR/networks.$$.ldap" -ETC_NETGROUP="$TMPDIR/netgroup.$$.ldap" -ETC_ALIASES="$TMPDIR/aliases.$$.ldap" +ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX` +ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX` +ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX` +ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX` +ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX` +ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX` +ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX` +ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX` +ETC_NETGROUP=`mktemp $TMPDIR/netgroup.ldap.XXXXXX` +ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX` EXIT=no question="Enter the NIS+ domain to import from (optional): " --- MigrationTools-36/migrate_all_offline.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_offline.sh Mon Feb 5 11:39:14 2001 @@ -42,7 +42,7 @@ # INSTDIR=/usr/share/openldap/migration/ -DB="/tmp/nis.$$.ldif" +DB=`mktemp /tmp/nis.ldif.XXXXXX` if [ "X$ETC_ALIASES" = "X" ]; then ETC_ALIASES=/etc/aliases --- MigrationTools-36/migrate_all_online.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_online.sh Mon Feb 5 11:39:14 2001 @@ -40,7 +40,7 @@ INSTDIR=/usr/share/openldap/migration/ -DB=/tmp/nis.$$.ldif +DB=`mktemp /tmp/nis.ldif.XXXXXX` if [ "X$ETC_ALIASES" = "X" ]; then ETC_ALIASES=/etc/aliases --- MigrationTools-36/migrate_all_nis_offline.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_nis_offline.sh Mon Feb 5 11:39:14 2001 @@ -41,15 +41,15 @@ INSTDIR=/usr/share/openldap/migration/ TMPDIR="/tmp" -ETC_PASSWD="$TMPDIR/passwd.$$.ldap" -ETC_GROUP="$TMPDIR/group.$$.ldap" -ETC_SERVICES="$TMPDIR/services.$$.ldap" -ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" -ETC_FSTAB="$TMPDIR/fstab.$$.ldap" -ETC_RPC="$TMPDIR/rpc.$$.ldap" -ETC_HOSTS="$TMPDIR/hosts.$$.ldap" -ETC_NETWORKS="$TMPDIR/networks.$$.ldap" -ETC_ALIASES="$TMPDIR/aliases.$$.ldap" +ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX` +ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX` +ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX` +ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX` +ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX` +ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX` +ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX` +ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX` +ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX` EXIT=no question="Enter the NIS domain to import from (optional): " --- MigrationTools-36/migrate_all_nis_online.sh Mon Feb 5 11:39:14 2001 +++ MigrationTools-36/migrate_all_nis_online.sh Mon Feb 5 11:39:14 2001 @@ -41,15 +41,15 @@ INSTDIR=/usr/share/openldap/migration/ TMPDIR="/tmp" -ETC_PASSWD="$TMPDIR/passwd.$$.ldap" -ETC_GROUP="$TMPDIR/group.$$.ldap" -ETC_SERVICES="$TMPDIR/services.$$.ldap" -ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" -ETC_FSTAB="$TMPDIR/fstab.$$.ldap" -ETC_RPC="$TMPDIR/rpc.$$.ldap" -ETC_HOSTS="$TMPDIR/hosts.$$.ldap" -ETC_NETWORKS="$TMPDIR/networks.$$.ldap" -ETC_ALIASES="$TMPDIR/aliases.$$.ldap" +ETC_PASSWD=`mktemp $TMPDIR/passwd.ldap.XXXXXX` +ETC_GROUP=`mktemp $TMPDIR/group.ldap.XXXXXX` +ETC_SERVICES=`mktemp $TMPDIR/services.ldap.XXXXXX` +ETC_PROTOCOLS=`mktemp $TMPDIR/protocols.ldap.XXXXXX` +ETC_FSTAB=`mktemp $TMPDIR/fstab.ldap.XXXXXX` +ETC_RPC=`mktemp $TMPDIR/rpc.ldap.XXXXXX` +ETC_HOSTS=`mktemp $TMPDIR/hosts.ldap.XXXXXX` +ETC_NETWORKS=`mktemp $TMPDIR/networks.ldap.XXXXXX` +ETC_ALIASES=`mktemp $TMPDIR/aliases.ldap.XXXXXX` EXIT=no question="Enter the NIS domain to import from (optional): "