From 3470eda3f5cea437a6de132b1ead3f27effd3902 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 21 Dec 2013 14:51:11 -0600 Subject: Rename runscript to openrc-run This was requested by Debian, because the minicom software, which is available on Debian and other distros, has a binary named runscript. We are keeping a backward compatibility symlink for now, but this allows Debian or any other distro to safely remove the symlink. X-Gentoo-Bug: 494220 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220 --- src/rc/.gitignore | 1 + src/rc/Makefile | 3 ++- src/rc/builtins.h | 1 + src/rc/rc-applets.c | 1 + src/rc/runscript.c | 13 ++++++++++--- 5 files changed, 15 insertions(+), 4 deletions(-) (limited to 'src/rc') diff --git a/src/rc/.gitignore b/src/rc/.gitignore index e04e2f35..bbfede6a 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 209523ab..5f5aa631 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 22bd0f20..2b38c675 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 8431eea3..b4f61d9f 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 e5cb62e8..981e6067 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)); +} -- cgit v1.2.3