From: Enrico Scholz Date: Thu, 30 Oct 2003 17:34:38 +0000 (+0000) Subject: use configured SBINDIR instead of hardcoded /usr/sbin X-Git-Tag: VERSION_0_10~1102 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6589c1fb41a1da4e8b8c83bd41e950895578109;p=util-vserver.git use configured SBINDIR instead of hardcoded /usr/sbin git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@343 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/src/rebootmgr.c b/util-vserver/src/rebootmgr.c index 2b1882f..9e43906 100644 --- a/util-vserver/src/rebootmgr.c +++ b/util-vserver/src/rebootmgr.c @@ -40,7 +40,7 @@ #ifdef HAVE_CONFIG_H # include #endif -#include "compat.h" +#include "pathconfig.h" #include #include @@ -104,13 +104,13 @@ static int rebootmgr_process (int fd, const char *vname) if (strcmp(buf,"reboot\n")==0){ char cmd[1000]; syslog (LOG_NOTICE,"reboot vserver %s\n",vname); - snprintf (cmd,sizeof(cmd)-1,"/usr/sbin/vserver %s restart >>/var/log/boot.log 2>&1",vname); + snprintf (cmd,sizeof(cmd)-1, SBINDIR "/vserver %s restart >>/var/log/boot.log 2>&1", vname); system (cmd); ret = 0; }else if (strcmp(buf,"halt\n")==0){ char cmd[1000]; syslog (LOG_NOTICE,"halt vserver %s\n",vname); - snprintf (cmd,sizeof(cmd)-1,"/usr/sbin/vserver %s stop >>/var/log/boot.log 2>&1",vname); + snprintf (cmd,sizeof(cmd)-1, SBINDIR "/vserver %s stop >>/var/log/boot.log 2>&1", vname); system (cmd); ret = 0; }else{