From 5ab9c1c10322a4db21349555d901646259d26d6f Mon Sep 17 00:00:00 2001 From: sin Date: Thu, 6 Feb 2014 12:01:00 +0000 Subject: Factor out the rc commands --- config.def.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 050d7e0..a257b45 100644 --- a/config.def.h +++ b/config.def.h @@ -1,6 +1,13 @@ /* See LICENSE file for copyright and license details. */ + +static const char *rcinitcmd[] = { "/bin/rc.init", NULL }; +static Arg rcinitarg = { .v = rcinitcmd }; + +static const char *rcrebootcmd[] = { "/bin/rc.shutdown", "reboot", NULL }; +static const char *rcpoweroffcmd[] = { "/bin/rc.shutdown", "poweroff", NULL }; + static const char *fifopath = "/var/run/sinit.fifo"; static Command commands[] = { - { "poweroff", cmdpoweroff, {0} }, - { "reboot", cmdreboot, {0} }, + { "poweroff", spawn, { .v = rcpoweroffcmd } }, + { "reboot", spawn, { .v = rcrebootcmd } }, }; -- cgit v1.2.3-54-g00ecf