mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From 052136cb9927379e75bc346d46c86d728f1e33ef Mon Sep 17 00:00:00 2001
|
|
From: Joachim Wiberg <troglobit@gmail.com>
|
|
Date: Tue, 2 Apr 2024 16:03:31 +0200
|
|
Subject: [PATCH 08/12] initctl: touch does not respect -n switch
|
|
Organization: Addiva Elektronik
|
|
|
|
Fixes #402
|
|
|
|
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
|
---
|
|
src/serv.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/serv.c b/src/serv.c
|
|
index e14d5ec..1cace46 100644
|
|
--- a/src/serv.c
|
|
+++ b/src/serv.c
|
|
@@ -377,9 +377,9 @@ int serv_touch(char *arg)
|
|
fn = conf(path, sizeof(path), arg, 0);
|
|
if (!fexist(fn)) {
|
|
if (!strstr(arg, "finit.conf"))
|
|
- ERRX(72, "%s not available.", arg);
|
|
+ ERRX(noerr ? 0 : 72, "%s not available.", 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));
|
|
fn = path;
|
|
@@ -387,7 +387,7 @@ int serv_touch(char *arg)
|
|
|
|
/* libite:touch() follows symlinks */
|
|
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;
|
|
}
|
|
--
|
|
2.34.1
|
|
|