aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-08-04 15:05:12 +0000
committerRoy Marples <roy@marples.name>2007-08-04 15:05:12 +0000
commit3e5526fd764a2701575e73e88293933c4e7bbd45 (patch)
tree9e1676d3711ad3bcceeed2c20781efbe19bcb3dd /src
parent9169c51d39ed17b98f6617f89fdf9d01723bff52 (diff)
Fix rc-update, #187487 and release rc2.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile3
-rw-r--r--src/builtins.h1
-rw-r--r--src/rc-update.c3
-rw-r--r--src/rc.c3
4 files changed, 8 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index 8090fcba..5c50cfd4 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -33,7 +33,8 @@ LIBRCSO = librc.so.$(LIBRCSOVER)
LIBRCOBJS = librc.o librc-depend.o librc-daemon.o librc-misc.o librc-strlist.o
RCOBJS = env-update.o fstabinfo.o mountinfo.o \
- rc-depend.o rc-plugin.o rc-status.o runscript.o start-stop-daemon.o
+ rc-depend.o rc-plugin.o rc-status.o rc-update.o runscript.o \
+ start-stop-daemon.o
LIB_TARGETS = $(LIBEINFOSO) $(LIBRCSO)
SBIN_TARGETS = rc
diff --git a/src/builtins.h b/src/builtins.h
index 9e467657..62a406b1 100644
--- a/src/builtins.h
+++ b/src/builtins.h
@@ -12,6 +12,7 @@ int fstabinfo (int argc, char **argv);
int mountinfo (int argc, char **argv);
int rc_depend (int argc, char **argv);
int rc_status (int argc, char **argv);
+int rc_update (int argc, char **argv);
int runscript (int argc, char **argv);
int start_stop_daemon (int argc, char **argv);
diff --git a/src/rc-update.c b/src/rc-update.c
index 151cae6c..96eb06bb 100644
--- a/src/rc-update.c
+++ b/src/rc-update.c
@@ -13,6 +13,7 @@
#include <string.h>
#include <unistd.h>
+#include "builtins.h"
#include "einfo.h"
#include "rc.h"
#include "rc-misc.h"
@@ -45,7 +46,7 @@ static bool add (const char *runlevel, const char *service)
return (retval);
}
-int main (int argc, char **argv)
+int rc_update (int argc, char **argv)
{
int i;
int j;
diff --git a/src/rc.c b/src/rc.c
index c226f805..cb13c850 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -717,6 +717,9 @@ int main (int argc, char **argv)
exit (rc_depend (argc, argv));
else if (strcmp (applet, "rc-status") == 0)
exit (rc_status (argc, argv));
+ else if (strcmp (applet, "rc-update") == 0 ||
+ strcmp (applet, "update-rc") == 0)
+ exit (rc_update (argc, argv));
else if (strcmp (applet, "runscript") == 0)
exit (runscript (argc, argv));
else if (strcmp (applet, "start-stop-daemon") == 0)