aboutsummaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-12-21 14:51:11 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-12-29 22:57:31 -0600
commit3470eda3f5cea437a6de132b1ead3f27effd3902 (patch)
treed360366f33bad25da13ff204c5ade7ce29098255 /src/rc/runscript.c
parentc096ad63caba72684010f446ecee87751da78e65 (diff)
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
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c13
1 files changed, 10 insertions, 3 deletions
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));
+}