mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
initctl: Follow-up to 6a5f439, don't fail if directory already exists
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ int serv_enable(char *arg)
|
||||
}
|
||||
|
||||
pushd(FINIT_RCSD);
|
||||
if (mkdir("enabled", 0755))
|
||||
if (mkdir("enabled", 0755) && EEXIST != errno)
|
||||
err(1, "Failed creating %s/enabled directory", FINIT_RCSD);
|
||||
|
||||
snprintf(path, sizeof(path), "%s/%s", available, arg);
|
||||
|
||||
Reference in New Issue
Block a user