aboutsummaryrefslogtreecommitdiff
path: root/src/rc
AgeCommit message (Collapse)Author
2011-11-19rc: usage: optimize help string alignment output a littleMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-19rc: fix style around case_RC_COMMON_GETOPTMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-17Fix compile warningWilliam Hubbs
2011-11-15mountinfo: Do not error out if realpath failsMike Frysinger
Reported-By: Dennis Schridde <devurandom@gmx.net> X-Gentoo-Bug: 383333 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=383333
2011-11-09ssd: fix building when SYS_ioprio_set is missingMike Frysinger
Older glibc's might not provide this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-08Use the real/actual path when looking for mountsChristian Ruppert
/proc/mounts contains real/actual paths so we should do the same in mountinfo.
2011-09-08Remove unused variableChristian Ruppert
2011-09-02Do not ignore return code for custom script functionsFlex
X-Gentoo-Bug: 380317 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380317
2011-09-01Start-stop-daemon: remove call to pam_authenticateDiego
2011-07-31Improve processing of service directories and conf.d filesWilliam Hubbs
symbolic links should not be followed in an attempt to work out the name of the service we are running. Also, @sysconfdir@/conf.d should be tried as a backup directory for configuration files. I would like to thank Robin Johnson for his input on this change. X-Gentoo-Bug: 350910 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=350910
2011-07-26runscript: rename saveDir back to save to fix compile errorWilliam Hubbs
2011-07-20rename save and save2 for clarityWilliam Hubbs
The names saveDir and saveLnk seem to better define how these variables are used.
2011-07-06Rename rc_logger_path to rc_log_pathChristian Ruppert
2011-07-05Improve loggingChristian Ruppert
Add "e" (O_CLOEXEC) to all fopen() calls. Remove system() call and replace it by fopen() and friends. This also fixes bug 368933 X-Gentoo-Bug: 368933 X-Gentoo-Bug-URL: https://bugs.gentoo.org/368933
2011-07-05Don't write into optarg, this also fixes a compiler warning.Christian Ruppert
2011-06-30Add --startas/-a back to the optstringChristian Ruppert
X-Gentoo-Bug: 373609 X-Gentoo-Bug-URL: https://bugs.gentoo.org/373609
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-27Only print the deprecation warning for --chuid/-c when using itJoe Harvell
The deprecation warning has been printed when using the replecement functions as well, bug 373243.
2011-06-05Warn if deprecated commandline options are used for start-stop-daemonChristian Ruppert
2011-06-03clean up gitignore filesMike Frysinger
Rather than listing explicit object files, ignore all of them in the whole tree. Also ignore patch/gdb related files throughout. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28rc-update: sort "show" outputMike Frysinger
X-Gentoo-Bug: 367305 X-Gentoo-Bug-URL: http://bugs.gentoo.org/367305 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28cc.mk: move debug.mk out of end MakefilesMike Frysinger
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>
2011-05-28rc: delete now unused local "i" variableMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-23Fix dirname calls in runscriptChristian Ruppert
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.
2011-02-16new implementation of applet optionWilliam Hubbs
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
2011-02-14make version option commonWilliam Hubbs
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.
2011-02-07fix symlink targetWilliam Hubbs
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.
2011-02-04rework pam, ncurses and termcap include filesWilliam Hubbs
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.
2011-01-31selinux: replace symlinks with wrapper scriptsChris Richards
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
2011-01-17Bug #351570: Hidden function fixes: rc_conf_value.Robin H. Johnson
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>
2011-01-17more whitespace cleanupMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17start-stop-daemon: use termios.h rather than sys/termios.hMike Frysinger
POSIX specifies termios.h, not sys/termios.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17Style fix: "char *foo" not "char* foo".Robin H. Johnson
2011-01-17Style fix: "while (" not "while(".Robin H. Johnson
2011-01-17Style fix: "if (" not "if(".Robin H. Johnson
2011-01-17Better error checking of argc for --applet call.Robin H. Johnson
2011-01-17Use xstrdup for style.Robin H. Johnson
2011-01-17Clean up all trailing whitespace in src/.Robin H. Johnson
2011-01-17Bug #351712: Implement --applet selection mode for SELinux wrappers.Robin H. Johnson
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>
2011-01-17Add new option -F to rc-depend tool, so that we can debug user deptree files ↵Robin H. Johnson
easily.
2011-01-12bug 351160: make openrc exit codes LSB compliantEray Aslan
* 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)
2011-01-05Implement explicit selection of subsystem types.Robin H. Johnson
- 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>
2010-12-03Avoid race condition in runscript (bug #319865)Thomas Pfaff
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.
2010-04-09restore init.d pause optionMike Frysinger
2010-03-26Fix -s and -S.Roy Marples
2010-03-17Fix two leaks.Roy Marples
2010-01-08random spelling fixesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-14start-stop-daemon can now set process IO scheduling.Roy Marples
2009-11-13Fix logicRoy Marples
2009-11-13Add a --warn option to just warn when reference file does not exist.Roy Marples
Fixes Gentoo #291894.