mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
initctl: touch does not respect -n switch
Fixes #402 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
742b8b72cc
commit
052136cb99
1 file changed
+3
-3
+3
-3
@@ -377,9 +377,9 @@ int serv_touch(char *arg)
|
|||||||
fn = conf(path, sizeof(path), arg, 0);
|
fn = conf(path, sizeof(path), arg, 0);
|
||||||
if (!fexist(fn)) {
|
if (!fexist(fn)) {
|
||||||
if (!strstr(arg, "finit.conf"))
|
if (!strstr(arg, "finit.conf"))
|
||||||
ERRX(72, "%s not available.", arg);
|
ERRX(noerr ? 0 : 72, "%s not available.", arg);
|
||||||
if (is_builtin(arg))
|
if (is_builtin(arg))
|
||||||
ERRX(4, "%s is a built-in service.", arg);
|
ERRX(noerr ? 0 : 4, "%s is a built-in service.", arg);
|
||||||
|
|
||||||
strlcpy(path, finit_conf, sizeof(path));
|
strlcpy(path, finit_conf, sizeof(path));
|
||||||
fn = path;
|
fn = path;
|
||||||
@@ -387,7 +387,7 @@ int serv_touch(char *arg)
|
|||||||
|
|
||||||
/* libite:touch() follows symlinks */
|
/* libite:touch() follows symlinks */
|
||||||
if (utimensat(AT_FDCWD, fn, NULL, AT_SYMLINK_NOFOLLOW))
|
if (utimensat(AT_FDCWD, fn, NULL, AT_SYMLINK_NOFOLLOW))
|
||||||
ERR(71, "failed marking %s for reload", fn);
|
ERR(noerr ? 0 : 71, "failed marking %s for reload", fn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user