mirror of
https://github.com/troglobit/finit.git
synced 2026-10-05 07:13:44 +07:00
initctl: Check mkdir() for error and give helpful message on fail
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+2
-1
@@ -140,7 +140,8 @@ int serv_enable(char *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushd(FINIT_RCSD);
|
pushd(FINIT_RCSD);
|
||||||
mkdir("enabled", 0755);
|
if (mkdir("enabled", 0755))
|
||||||
|
err(1, "Failed creating %s/enabled directory", FINIT_RCSD);
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "%s/%s", available, arg);
|
snprintf(path, sizeof(path), "%s/%s", available, arg);
|
||||||
if (!fexist(path))
|
if (!fexist(path))
|
||||||
|
|||||||
Reference in New Issue
Block a user