diff options
Diffstat (limited to 'runit')
-rw-r--r-- | runit/Config.src | 79 | ||||
-rw-r--r-- | runit/Kbuild.src | 11 | ||||
-rw-r--r-- | runit/chpst.c | 45 | ||||
-rw-r--r-- | runit/runsv.c | 12 | ||||
-rw-r--r-- | runit/runsvdir.c | 22 | ||||
-rw-r--r-- | runit/sv.c | 20 | ||||
-rw-r--r-- | runit/svlogd.c | 13 |
7 files changed, 107 insertions, 95 deletions
diff --git a/runit/Config.src b/runit/Config.src index 9db974002..8cde89680 100644 --- a/runit/Config.src +++ b/runit/Config.src @@ -7,83 +7,4 @@ menu "Runit Utilities" INSERT -config RUNSV - bool "runsv" - default y - help - runsv starts and monitors a service and optionally an appendant log - service. - -config RUNSVDIR - bool "runsvdir" - default y - help - runsvdir starts a runsv process for each subdirectory, or symlink to - a directory, in the services directory dir, up to a limit of 1000 - subdirectories, and restarts a runsv process if it terminates. - -config FEATURE_RUNSVDIR_LOG - bool "Enable scrolling argument log" - depends on RUNSVDIR - default n - help - Enable feature where second parameter of runsvdir holds last error - message (viewable via top/ps). Otherwise (feature is off - or no parameter), error messages go to stderr only. - -config SV - bool "sv" - default y - help - sv reports the current status and controls the state of services - monitored by the runsv supervisor. - -config SV_DEFAULT_SERVICE_DIR - string "Default directory for services" - default "/var/service" - depends on SV - help - Default directory for services. - Defaults to "/var/service" - -config SVLOGD - bool "svlogd" - default y - help - svlogd continuously reads log data from its standard input, optionally - filters log messages, and writes the data to one or more automatically - rotated logs. - -config CHPST - bool "chpst" - default y - help - chpst changes the process state according to the given options, and - execs specified program. - -config SETUIDGID - bool "setuidgid" - default y - help - Sets soft resource limits as specified by options - -config ENVUIDGID - bool "envuidgid" - default y - help - Sets $UID to account's uid and $GID to account's gid - -config ENVDIR - bool "envdir" - default y - help - Sets various environment variables as specified by files - in the given directory - -config SOFTLIMIT - bool "softlimit" - default y - help - Sets soft resource limits as specified by options - endmenu diff --git a/runit/Kbuild.src b/runit/Kbuild.src index 0fce95507..6b4fb7470 100644 --- a/runit/Kbuild.src +++ b/runit/Kbuild.src @@ -7,14 +7,3 @@ lib-y:= INSERT - -lib-$(CONFIG_RUNSV) += runsv.o -lib-$(CONFIG_RUNSVDIR) += runsvdir.o -lib-$(CONFIG_SV) += sv.o -lib-$(CONFIG_SVLOGD) += svlogd.o -lib-$(CONFIG_CHPST) += chpst.o - -lib-$(CONFIG_ENVDIR) += chpst.o -lib-$(CONFIG_ENVUIDGID) += chpst.o -lib-$(CONFIG_SETUIDGID) += chpst.o -lib-$(CONFIG_SOFTLIMIT) += chpst.o diff --git a/runit/chpst.c b/runit/chpst.c index 71af29f66..301cdd08a 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -26,7 +26,50 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ -/* Dependencies on runit_lib.c removed */ + +//config:config CHPST +//config: bool "chpst" +//config: default y +//config: help +//config: chpst changes the process state according to the given options, and +//config: execs specified program. +//config: +//config:config SETUIDGID +//config: bool "setuidgid" +//config: default y +//config: help +//config: Sets soft resource limits as specified by options +//config: +//config:config ENVUIDGID +//config: bool "envuidgid" +//config: default y +//config: help +//config: Sets $UID to account's uid and $GID to account's gid +//config: +//config:config ENVDIR +//config: bool "envdir" +//config: default y +//config: help +//config: Sets various environment variables as specified by files +//config: in the given directory +//config: +//config:config SOFTLIMIT +//config: bool "softlimit" +//config: default y +//config: help +//config: Sets soft resource limits as specified by options + +//applet:IF_CHPST(APPLET(chpst, BB_DIR_USR_BIN, BB_SUID_DROP)) +//applet:IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir)) +//applet:IF_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envuidgid)) +//applet:IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, setuidgid)) +//applet:IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, softlimit)) + +//kbuild:lib-$(CONFIG_CHPST) += chpst.o +//kbuild:lib-$(CONFIG_ENVDIR) += chpst.o +//kbuild:lib-$(CONFIG_ENVUIDGID) += chpst.o +//kbuild:lib-$(CONFIG_SETUIDGID) += chpst.o +//kbuild:lib-$(CONFIG_SOFTLIMIT) += chpst.o //usage:#define chpst_trivial_usage //usage: "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" diff --git a/runit/runsv.c b/runit/runsv.c index 6cf5bcc29..4b18d12d5 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -26,7 +26,17 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ -/* TODO: depends on runit_lib.c - review and reduce/eliminate */ + +//config:config RUNSV +//config: bool "runsv" +//config: default y +//config: help +//config: runsv starts and monitors a service and optionally an appendant log +//config: service. + +//applet:IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_RUNSV) += runsv.o //usage:#define runsv_trivial_usage //usage: "DIR" diff --git a/runit/runsvdir.c b/runit/runsvdir.c index b4c0b2ef0..b3d9e7390 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c @@ -26,7 +26,27 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ -/* TODO: depends on runit_lib.c - review and reduce/eliminate */ + +//config:config RUNSVDIR +//config: bool "runsvdir" +//config: default y +//config: help +//config: runsvdir starts a runsv process for each subdirectory, or symlink to +//config: a directory, in the services directory dir, up to a limit of 1000 +//config: subdirectories, and restarts a runsv process if it terminates. +//config: +//config:config FEATURE_RUNSVDIR_LOG +//config: bool "Enable scrolling argument log" +//config: depends on RUNSVDIR +//config: default n +//config: help +//config: Enable feature where second parameter of runsvdir holds last error +//config: message (viewable via top/ps). Otherwise (feature is off +//config: or no parameter), error messages go to stderr only. + +//applet:IF_RUNSVDIR(APPLET(runsvdir, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_RUNSVDIR) += runsvdir.o //usage:#define runsvdir_trivial_usage //usage: "[-P] [-s SCRIPT] DIR" diff --git a/runit/sv.c b/runit/sv.c index 825e9d45b..de8a0d8a4 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -151,7 +151,25 @@ Exit Codes */ /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ -/* TODO: depends on runit_lib.c - review and reduce/eliminate */ + +//config:config SV +//config: bool "sv" +//config: default y +//config: help +//config: sv reports the current status and controls the state of services +//config: monitored by the runsv supervisor. +//config: +//config:config SV_DEFAULT_SERVICE_DIR +//config: string "Default directory for services" +//config: default "/var/service" +//config: depends on SV +//config: help +//config: Default directory for services. +//config: Defaults to "/var/service" + +//applet:IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_SV) += sv.o //usage:#define sv_trivial_usage //usage: "[-v] [-w SEC] CMD SERVICE_DIR..." diff --git a/runit/svlogd.c b/runit/svlogd.c index c080b9acc..dbe8df65c 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c @@ -26,7 +26,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ -/* TODO: depends on runit_lib.c - review and reduce/eliminate */ /* Config files @@ -125,6 +124,18 @@ log message, you can use a pattern like this instead -*: *: pid * */ +//config:config SVLOGD +//config: bool "svlogd" +//config: default y +//config: help +//config: svlogd continuously reads log data from its standard input, optionally +//config: filters log messages, and writes the data to one or more automatically +//config: rotated logs. + +//applet:IF_SVLOGD(APPLET(svlogd, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_SVLOGD) += svlogd.o + //usage:#define svlogd_trivial_usage //usage: "[-ttv] [-r C] [-R CHARS] [-l MATCHLEN] [-b BUFLEN] DIR..." //usage:#define svlogd_full_usage "\n\n" |