From f57e2eabe0a10c9732c83532e01654a499fb8dcf Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 21 Jun 2021 17:47:13 -0400 Subject: many, many changes; settings is broken --- src/user/init/init.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/user/init') 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 #include #include -#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); -- cgit v1.2.3