diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2016-05-04 18:17:58 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-05-04 18:17:58 -0500 |
commit | ad23d5b8dbee70815c02271c78f415bcd7088076 (patch) | |
tree | 34c69e89037dfcc6b7e07d8640a74bb44bd9e533 /src | |
parent | 62410eaf4ba92516a58a550717d7f3faf63bb79f (diff) |
openrc-run: clean up runscript deprecation message
Diffstat (limited to 'src')
-rw-r--r-- | src/rc/openrc-run.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c index 5e3ba677..dfb4c6fe 100644 --- a/src/rc/openrc-run.c +++ b/src/rc/openrc-run.c @@ -1106,6 +1106,7 @@ service_plugable(void) int main(int argc, char **argv) { bool doneone = false; + bool runscript = false; int retval, opt, depoptions = RC_DEP_TRACE; RC_STRING *svc; char path[PATH_MAX], lnk[PATH_MAX]; @@ -1123,7 +1124,7 @@ int main(int argc, char **argv) applet = basename_c(argv[0]); if (strcmp(applet, "runscript") == 0) - ewarnv("runscript is deprecated, please use openrc-run instead."); + runscript = true; if (stat(argv[1], &stbuf) != 0) { fprintf(stderr, "openrc-run `%s': %s\n", @@ -1172,6 +1173,9 @@ int main(int argc, char **argv) if (argc < 3) usage(EXIT_FAILURE); + if (runscript) + ewarnv("%s uses runscript, please convert to openrc-run.", service); + /* Change dir to / to ensure all init scripts don't use stuff in pwd */ if (chdir("/") == -1) eerror("chdir: %s", strerror(errno)); |