X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fvserver-start%2Fvshelper.c;h=c640872f5837ab1d93fc225596fe17707b609186;hb=328f35cbd18b219a593f75b2048f2b45ad65f912;hp=4e1b1febbff3e7ea7be975cc390161100a041db1;hpb=e3be43e3ee2157a63ea175463629c2433f595854;p=util-vserver.git diff --git a/util-vserver/vserver-start/vshelper.c b/util-vserver/vserver-start/vshelper.c index 4e1b1fe..c640872 100644 --- a/util-vserver/vserver-start/vshelper.c +++ b/util-vserver/vserver-start/vshelper.c @@ -29,14 +29,15 @@ void Vshelper_doSanityCheck() { - struct Command cmd = { - .filename = "/bin/bash" + struct Command cmd; + char const * argv[] = { + "/bin/bash", "-c", + ". " PATH_UTILVSERVER_VARS ";. " PATH_FUNCTIONS "; vshelper.doSanityCheck", + 0 }; - Command_init(&cmd, 10); - Command_appendParameter(&cmd, "/bin/bash"); - Command_appendParameter(&cmd, "-c"); - Command_appendParameter(&cmd, ". " PATH_UTILVSERVER_VARS ";. " PATH_FUNCTIONS "; vshelper.doSanityCheck"); + Command_init(&cmd); + Command_setParams(&cmd, argv); if (!Command_exec(&cmd, true) || !Command_wait(&cmd, true)) WRITE_MSG(2, "vserver-start: failed to do the vshelper-sanitycheck\n");