diff options
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); |