backing out to version 208 of util-vserver
[util-vserver.git] / scripts / pkgmgmt
index 7d07458..99cc96c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# $Id: pkgmgmt 2291 2006-09-12 10:47:38Z dhozac $
+# $Id: pkgmgmt,v 1.13 2005/07/03 17:43:34 ensc Exp $
 
 # Copyright (C) 2004,2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -94,7 +94,7 @@ function _substFile()
     
     $_CHROOT_SH testfile "$file" || return 0
 
-    local tmp=$($_MKTEMP pkgmgmt_subst.XXXXXX)
+    local tmp=$($_MKTEMP /tmp/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 apt.conf.XXXXXX)
+    local tmp=$($_MKTEMP /tmp/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 apt.conf.XXXXXX)
+    local tmp=$($_MKTEMP /tmp/apt.conf.XXXXXX)
     trap "$_RM -f $tmp" EXIT
 
     $_SED -e "s|^$hash$hash\(.*@autogenerated@\)|\1|" "$1" >$tmp
@@ -160,9 +160,8 @@ function _mountFilesystems()
     }
     test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1"
     
-    _mountFilesystemsInternal "$cfgdir"/fstab                                     || return 1
-    _mountFilesystemsInternal "$cfgdir"/fstab.local                               || return 1
-    _mountFilesystemsInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || return 1
+    _mountFilesystemsInternal "$cfgdir"/fstab       $_CHBIND "${CHBIND_OPTS[@]}" || return 1
+    _mountFilesystemsInternal "$cfgdir"/fstab.local $_CHBIND "${CHBIND_OPTS[@]}" || return 1
 }
 
 function _umountFilesystems()
@@ -177,9 +176,8 @@ function _umountFilesystems()
     test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1"
 
     pushd "$vdir/" >/dev/null || return 1
-       _umountVserverInternal  "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
-       _umountVserverInternal  "$cfgdir"/fstab.local                               || is_ok=
-       _umountVserverInternal  "$cfgdir"/fstab                                     || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab.local                              || is_ok=
+       _umountVserverInternal  "$cfgdir"/fstab       $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
     popd >/dev/null           || return 1
     
     test -n "$is_ok"
@@ -352,7 +350,7 @@ Can not continue; use '--force' to override this check"
     if test -n "$is_internalize"; then
        :
     else
-       tmpdir=$($_MKTEMPDIR -p /var/tmp pkgmgmt.XXXXXX)
+       tmpdir=$($_MKTEMPDIR /var/tmp/pgmgmt.XXXXXX)
        trap "$_RM -rf $tmpdir" EXIT
        pushd "$vdir" >/dev/null
        $_EXEC_CD /var/lib $_MV rpm $tmpdir/