mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
initctl: ignore missing files to delete command, simplify yorn() str
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
e2f6ac0ece
commit
93f9856da8
1 file changed
+5
-3
+5
-3
@@ -352,10 +352,12 @@ int serv_delete(char *arg)
|
||||
if (!fn)
|
||||
errx(1, FINIT_RCSD " missing on system.");
|
||||
|
||||
if (!fexist(fn))
|
||||
errx(1, "Cannot find %s", fn);
|
||||
if (!fexist(fn)) {
|
||||
warnx(1, "Cannot find %s", fn);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (yorn("Remove %s and any enabled symlink (y/N)? ", fn)) {
|
||||
if (yorn("Remove file and symlink(s) to %s (y/N)? ", fn)) {
|
||||
do_disable(arg, 0);
|
||||
remove(fn);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user