made '/usr/sbin' path customizable; perl-scripts will be substituted now
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 30 Oct 2003 00:38:28 +0000 (00:38 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 30 Oct 2003 00:38:28 +0000 (00:38 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@307 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/vkill.subst [moved from util-vserver/scripts/vkill with 93% similarity]
util-vserver/scripts/vps.subst [moved from util-vserver/scripts/vps with 97% similarity]

similarity index 93%
rename from util-vserver/scripts/vkill
rename to util-vserver/scripts/vkill.subst
index cbf3fb1..78c129a 100755 (executable)
@@ -25,7 +25,7 @@
 $PROC = $ARGV[0];
 
 # Grab the output from a context query against this process id
-open(PH, "/usr/sbin/chcontext --silent --ctx 1 cat /proc/$PROC/status 2>&1 |");
+open(PH, "@SBINDIR@/chcontext --silent --ctx 1 cat /proc/$PROC/status 2>&1 |");
 
 # Loop through the output
 while (<PH>) {
@@ -41,7 +41,7 @@ while (<PH>) {
 
       # Since we have the context and the process id, we can kill it
       print " + Killing... ";
-      `/usr/sbin/chcontext --ctx $1 kill $PROC`;
+      `@SBINDIR@/chcontext --ctx $1 kill $PROC`;
       print "[done]\n";
 
     } else {
similarity index 97%
rename from util-vserver/scripts/vps
rename to util-vserver/scripts/vps.subst
index 0287bde..195ede0 100755 (executable)
@@ -42,7 +42,7 @@ if ($context == -1) {
    exit;
 }
 if ($context != 1) {
-   exec("/usr/sbin/chcontext --silent --ctx 1 $0 @ARGV");
+   exec("@SBINDIR@/chcontext --silent --ctx 1 $0 @ARGV");
    print "Can not execute chcontext\n";
    exit; # not reached
 }