made 'nodev' work
[util-vserver.git] / util-vserver / scripts / pkgmgmt
index 1ab232a..a641dfb 100755 (executable)
@@ -18,7 +18,7 @@
 
 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
 test -e "$UTIL_VSERVER_VARS" || {
-    echo "Can not find util-vserver installation; aborting..." >&2
+    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
     exit 1
 }
 . "$UTIL_VSERVER_VARS"
@@ -132,15 +132,8 @@ function processVserver_RH()
     cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
 
     ## Figure out the environment....
-    if test "$is_internalize"; then
-       have_apt=1
-       test -d "$cfgdir"/base/apt -o -d "$cfgdir"/aptetc || have_apt=
-    else
-       have_apt=
-       for i in /bin /usr/bin /usr/local/bin; do
-           test ! -x "$vdir$i"/apt-get || { have_apt=1; break; }
-       done
-    fi
+    have_apt=1
+    pkgmgmt.isAptAvailable "$cfgdir" "$vdir" "$is_internalize" || have_apt=
 
     local APTETCDIR=
     local APTSTATEDIR=