diff options
author | sin <sin@2f30.org> | 2014-02-06 12:01:00 +0000 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-02-06 12:01:00 +0000 |
commit | 5ab9c1c10322a4db21349555d901646259d26d6f (patch) | |
tree | 98fa9daeb9b51b585dd9b72e612e1a1249f66755 /config.def.h | |
parent | 2273a1fca05b14f2cabbf212d9b3a4247520fe2e (diff) |
Factor out the rc commands
Diffstat (limited to 'config.def.h')
-rw-r--r-- | config.def.h | 11 |
1 files changed, 9 insertions, 2 deletions
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 } }, }; |