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
This commit is contained in:
1
src/rc/.gitignore
vendored
1
src/rc/.gitignore
vendored
@@ -58,3 +58,4 @@ mark_service_failed
|
||||
rc-abort
|
||||
rc
|
||||
openrc
|
||||
openrc-run
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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 **);
|
||||
|
||||
@@ -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, },
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user