diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-12-30 16:54:04 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-12-30 16:54:04 +0100 |
commit | cf468ad0fd5426c2625626eb1e8dac2c223210e7 (patch) | |
tree | 2f4041d57c1dc70311872880fc5cc39c1c387dd7 /src | |
parent | 37a57b1a4004ab89424d8881d0b33b59709e375a (diff) | |
parent | 3470eda3f5cea437a6de132b1ead3f27effd3902 (diff) | |
download | openrc-embtk-0.13.tar.gz openrc-embtk-0.13.tar.bz2 openrc-embtk-0.13.tar.xz |
Merge branch 'master' into openrc-master-embtkopenrc-embtk-0.13openrc-master-embtk
Diffstat (limited to 'src')
-rw-r--r-- | src/rc/.gitignore | 1 | ||||
-rw-r--r-- | src/rc/Makefile | 3 | ||||
-rw-r--r-- | src/rc/builtins.h | 1 | ||||
-rw-r--r-- | src/rc/rc-applets.c | 1 | ||||
-rw-r--r-- | src/rc/runscript.c | 13 |
5 files changed, 15 insertions, 4 deletions
diff --git a/src/rc/.gitignore b/src/rc/.gitignore index e04e2f3..bbfede6 100644 --- a/src/rc/.gitignore +++ b/src/rc/.gitignore @@ -58,3 +58,4 @@ mark_service_failed rc-abort rc openrc +openrc-run diff --git a/src/rc/Makefile b/src/rc/Makefile index 209523a..5f5aa63 100644 --- a/src/rc/Makefile +++ b/src/rc/Makefile @@ -11,7 +11,8 @@ SBINDIR= ${PREFIX}/sbin LINKDIR= ${LIBEXECDIR} BINLINKS= rc-status -SBINLINKS= rc rc-service rc-update runscript service start-stop-daemon +SBINLINKS= rc rc-service rc-update openrc-run runscript service \ + start-stop-daemon RC_BINLINKS= einfon einfo ewarnn ewarn eerrorn eerror ebegin eend ewend \ eindent eoutdent esyslog eval_ecolors ewaitfile \ veinfo vewarn vebegin veend vewend veindent veoutdent \ diff --git a/src/rc/builtins.h b/src/rc/builtins.h index 22bd0f2..2b38c67 100644 --- a/src/rc/builtins.h +++ b/src/rc/builtins.h @@ -28,6 +28,7 @@ int checkpath(int, char **); int fstabinfo(int, char **); int mountinfo(int, char **); +int openrc_run(int, char **); int rc_depend(int, char **); int rc_service(int, char **); int rc_status(int, char **); diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c index 8431eea..b4f61d9 100644 --- a/src/rc/rc-applets.c +++ b/src/rc/rc-applets.c @@ -503,6 +503,7 @@ static const struct { #define A(a) { #a, a } A(fstabinfo), A(mountinfo), + { "openrc-run", openrc_run, }, { "rc-depend", rc_depend, }, { "rc-service", rc_service, }, { "rc-status", rc_status, }, diff --git a/src/rc/runscript.c b/src/rc/runscript.c index e5cb62e..981e606 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -1116,7 +1116,7 @@ static const char *const longopts_help[] = { #include "_usage.c" int -runscript(int argc, char **argv) +openrc_run(int argc, char **argv) { bool doneone = false; int retval, opt, depoptions = RC_DEP_TRACE; @@ -1130,12 +1130,12 @@ runscript(int argc, char **argv) /* Show help if insufficient args */ if (argc < 2 || !exists(argv[1])) { - fprintf(stderr, "runscript should not be run directly\n"); + fprintf(stderr, "openrc-run should not be run directly\n"); exit(EXIT_FAILURE); } if (stat(argv[1], &stbuf) != 0) { - fprintf(stderr, "runscript `%s': %s\n", + fprintf(stderr, "openrc-run `%s': %s\n", argv[1], strerror(errno)); exit(EXIT_FAILURE); } @@ -1420,3 +1420,10 @@ runscript(int argc, char **argv) return retval; } + +int +runscript(int argc, char **argv) +{ + ewarn("runscript is deprecated; please use openrc-run instead."); + return (openrc_run(argc, argv)); +} |