Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
Date: Wed, 04 May 2016 23:25:04
Message-Id: 1462403878.ad23d5b8dbee70815c02271c78f415bcd7088076.williamh@OpenRC
1 commit: ad23d5b8dbee70815c02271c78f415bcd7088076
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Wed May 4 23:17:58 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed May 4 23:17:58 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ad23d5b8
7
8 openrc-run: clean up runscript deprecation message
9
10 src/rc/openrc-run.c | 6 +++++-
11 1 file changed, 5 insertions(+), 1 deletion(-)
12
13 diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c
14 index 5e3ba67..dfb4c6f 100644
15 --- a/src/rc/openrc-run.c
16 +++ b/src/rc/openrc-run.c
17 @@ -1106,6 +1106,7 @@ service_plugable(void)
18 int main(int argc, char **argv)
19 {
20 bool doneone = false;
21 + bool runscript = false;
22 int retval, opt, depoptions = RC_DEP_TRACE;
23 RC_STRING *svc;
24 char path[PATH_MAX], lnk[PATH_MAX];
25 @@ -1123,7 +1124,7 @@ int main(int argc, char **argv)
26
27 applet = basename_c(argv[0]);
28 if (strcmp(applet, "runscript") == 0)
29 - ewarnv("runscript is deprecated, please use openrc-run instead.");
30 + runscript = true;
31
32 if (stat(argv[1], &stbuf) != 0) {
33 fprintf(stderr, "openrc-run `%s': %s\n",
34 @@ -1172,6 +1173,9 @@ int main(int argc, char **argv)
35 if (argc < 3)
36 usage(EXIT_FAILURE);
37
38 + if (runscript)
39 + ewarnv("%s uses runscript, please convert to openrc-run.", service);
40 +
41 /* Change dir to / to ensure all init scripts don't use stuff in pwd */
42 if (chdir("/") == -1)
43 eerror("chdir: %s", strerror(errno));