use pkgmgmt.isAptAvailable()
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 26 Mar 2004 07:31:50 +0000 (07:31 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 26 Mar 2004 07:31:50 +0000 (07:31 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1368 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/pkgmgmt

index 1ab232a..c851fb5 100755 (executable)
@@ -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=