Age | Commit message (Collapse) | Author |
|
Since we always want debug.mk whenever we include cc.mk, move the include
out of the Makefiles and into cc.mk itself. This also fixes an include
order bug in rc/Makefile where debug.mk is included before cc.mk and
breaks the default CFLAGS setup in cc.mk.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
runscript will try to get the dir and basename of a file/link in case it
contains at least one slash. This patch gives a temporary copy of the path to
the dirname() function since dirname() can modify its argument.
|
|
This reworks the implementation of the --applet option so that it is
processed in run_applets() and does not require two calls to the
getopts_long() function. It is based on code by Robin Johnson and Chris
Richards.
X-Gentoo-Bug: 351712
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=351712
|
|
This reworks the code for the version option so that it is part of the
parser loop and is a common option to all applets.
|
|
The target for the symlinks in ${SBINDIR} (the same directory as the rc
binary) was "rc". This is not correct; the target should be
${SBINDIR}/rc instead.
|
|
This allows error checking inside the included files instead of either
including the appropriate file or a blank file.
Also the blank file named .mk gets removed by this change.
|
|
This needs to be done on selinux systems so the proper context can be
set for each rc applet.
X-Gentoo-Bug: 351712
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=351712
|
|
Refactor rc_conf_value into librc for use in library context.
Also requires moving:
- rc_conf internal static
- Defines: PROFILE_ENV, SYS_WHITELIST, USR_WHITELIST, RC_PATH_PREFIX
moved to rc.h with new RC_ prefix added.
- Defines: RC_CONF, RC_CONF_OLD moved to rc.h.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
POSIX specifies termios.h, not sys/termios.h.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In addition to detecting what multicall applet we want via argv[0],
provide an explicit override mode with a --applet initial argument.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
easily.
|
|
* status on a stopped service now has a return code of 3 (was 1)
* starting an already started service now has a return code of 0 (was 1)
* stopping an already stopped service now has a return code of 0 (was 1)
|
|
- Fixes bugs #347583, #349389, both of which were triggered by cgroups
being detected as the LXC subsystem type.
- Makes it much easier to select "prefix" type.
- "rc -S" will now print a warning if you have not configured rc_sys in
/etc/rc.conf
- All other semantics of rc_sys are unchanged in this patch.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Under normal conditions, runscript creates one child and waits for its
termination, which is signaled by a pipe write from the SIGCHLD
sighandler.
When running killprocs however more than one SIGHCLD signal is generated, at
least on all of my amd64 boxes running on real hardware and in vmware.
When the first SIGCHLD occurs svc_exec leaves the loop and closes the pipe.
Subsequent SIGCHLDs during the close can lead to a race condition and create an
EBADF error in the pipe write (pipe is closed but the file handle is still !=
-1).
We avoid this by blocking SIGHCHLD during the pipe close.
|
|
|
|
|
|
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
Fixes Gentoo #291894.
|
|
|
|
The wait time was in seconds. This patch converts it to milliseconds.
|
|
the mtime of a file. It saves the shutdown time to this file also.
This is handy for systems without a working RTC chip.
Based on an idea by Michael A. Smith <michael@smith-li.com>.
Fixes Gentoo #272073.
|
|
|
|
|
|
Fixes #197.
|
|
|
|
|
|
|
|
This matches the ifconfig and Gentoo USE flag syntax and is hopefully
easier to read.
Fixes #178.
|
|
This is now requires as COMMAND_LINE_SIZE isn't exposed by kernel
headers anymore.
Fixes #177.
|
|
|
|
OpenRC version is now stored as plaintext in /libexec/rc/version
Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.
|
|
|
|
|
|
|
|
This implementation has the limitation that you cannot have a stacked
runlevel and service of the same name in a runlevel.
|
|
|
|
rc-sercice -i foo -- restart
instead of this
rc-service -e foo && rc-service foo -- restart
|
|
|
|
without actually doing so.
Fixes #151.
|