changed the way how temporary files/directories will be created:
[util-vserver.git] / util-vserver / scripts / pkgmgmt
index 397eca2..04ddd42 100755 (executable)
@@ -94,7 +94,7 @@ function _substFile()
     
     $_CHROOT_SH testfile "$file" || return 0
 
-    local tmp=$($_MKTEMP /tmp/pkgmgmt_subst.XXXXXX)
+    local tmp=$($_MKTEMP pkgmgmt_subst.XXXXXX)
     trap "$_RM -f $tmp" EXIT
 
     $_CHROOT_SH cat "$file" | \
@@ -113,7 +113,7 @@ function _hashAuto()
 
     $_CHROOT_SH testfile "$file" || return 0
     
-    local tmp=$($_MKTEMP /tmp/apt.conf.XXXXXX)
+    local tmp=$($_MKTEMP apt.conf.XXXXXX)
     trap "$_RM -f $tmp" EXIT
 
     $_CHROOT_SH cat "$file" | \
@@ -130,7 +130,7 @@ function _unhashAuto()
     test -e "$1" || return 0
 
     local hash=$2
-    local tmp=$($_MKTEMP /tmp/apt.conf.XXXXXX)
+    local tmp=$($_MKTEMP apt.conf.XXXXXX)
     trap "$_RM -f $tmp" EXIT
 
     $_SED -e "s|^$hash$hash\(.*@autogenerated@\)|\1|" "$1" >$tmp
@@ -350,7 +350,7 @@ Can not continue; use '--force' to override this check"
     if test -n "$is_internalize"; then
        :
     else
-       tmpdir=$($_MKTEMPDIR /var/tmp/pgmgmt.XXXXXX)
+       tmpdir=$($_MKTEMPDIR -p /var/tmp pkgmgmt.XXXXXX)
        trap "$_RM -rf $tmpdir" EXIT
        pushd "$vdir" >/dev/null
        $_EXEC_CD /var/lib $_MV rpm $tmpdir/