diff options
author | Benji Dial <benji6283@gmail.com> | 2021-06-21 17:47:13 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-06-21 17:47:13 -0400 |
commit | f57e2eabe0a10c9732c83532e01654a499fb8dcf (patch) | |
tree | cbf91a23fcdd65e0ea7ed55b0940ca7042d59bef /src/user/init/init.c | |
parent | 83835306d57461205a7bcfef9f4c3e06bc504006 (diff) | |
download | portland-os-f57e2eabe0a10c9732c83532e01654a499fb8dcf.tar.gz |
many, many changes; settings is broken
Diffstat (limited to 'src/user/init/init.c')
-rw-r--r-- | src/user/init/init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/user/init/init.c b/src/user/init/init.c index 860c45f..0934943 100644 --- a/src/user/init/init.c +++ b/src/user/init/init.c @@ -1,7 +1,8 @@ +#include <knob/block.h> #include <knob/file.h> #include <knob/task.h> -#define STARTUP_FILE_PATH "sys/startup.rc" +#define STARTUP_FILE_PATH "/sys/startup.rc" #define CMD_BUF_LEN 1024 char cmdbuf[CMD_BUF_LEN]; @@ -16,11 +17,9 @@ void main() { while (read_line_from_file(f, cmdbuf, CMD_BUF_LEN - 1)) { if (cmdbuf[0] == '#') continue; - //syslogf(run_command(cmdbuf) - // ? "[init] Started %s." - // : "[init] Could not run %s." - //, cmdbuf); - run_command(cmdbuf, 0); + bool started = (bool)run_command(cmdbuf, 0); + str_trunc_fill(cmdbuf, 30); + syslogf(started ? "Started %s" : "Could not start %s", cmdbuf); } close_file(f); |