--- etc/rc.d/abi +++ etc/rc.d/abi @@ -28,7 +28,7 @@ echo -n ' linux' load_kld -e 'linux(aout|elf)' linux if [ -x /compat/linux/sbin/ldconfigDisabled ]; then - _tmpdir=`mktemp -d -t linux-ldconfig` + _tmpdir=`mktemp -d ${TMPDIR:-/tmp}/linux-ldconfig.XXXXXXXXXX` /compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache if ! cmp -s ${_tmpdir}/ld.so.cache /compat/linux/etc/ld.so.cache; then cat ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache --- etc/rc.d/gbde +++ etc/rc.d/gbde @@ -33,7 +33,7 @@ fstab="/etc/fstab" ;; stop) - fstab=$(mktemp /tmp/mtab.XXXXXX) + fstab=$(mktemp ${TMPDIR:-/tmp}/mtab.XXXXXX) mount -p >${fstab} ;; esac --- etc/rc.d/jail +++ etc/rc.d/jail @@ -557,7 +557,7 @@ echo '.' echo -n 'Starting jails:' - _tmp_dir=`mktemp -d /tmp/jail.XXXXXXXX` || \ + _tmp_dir=`mktemp -d ${TMPDIR:-/tmp}/jail.XXXXXXXX` || \ err 3 "$name: Can't create temp dir, exiting..." for _jail in ${jail_list} do --- etc/rc.d/motd +++ etc/rc.d/motd @@ -32,7 +32,7 @@ return fi - T=`mktemp -t motd` + T=`mktemp ${TMPDIR:-/tmp}/motd.XXXXXXXXXX` uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T} awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T}