summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* librc: make rc_proc_getent available for all operating systemsWilliam Hubbs2012-02-25
| | | | | | This looks up an option on the kernel command line. For now, it works on linux and returns NULL on the bsds, but we are definitely open to patches for that side.
* Skip pam if running as rootWilliam Hubbs2012-02-24
| | | | | | Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com> X-Gentoo-Bug: 386623 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=386623
* Remove prefix supportopenrc-0.9.9William Hubbs2012-02-21
| | | | | I spoke with the prefix team sometime back and was told that they do not have an interest in using OpenRC on prefix systems.
* rc: remove calls to rc_sys_v2 and rc_sys_v1William Hubbs2012-02-20
| | | | | These separate calls are no longer needed since we do not warn about falling back to automatic detection.
* remove the warning about falling back to autodetectionJory A. Pratt2012-02-20
|
* Fix some more warningsChristian Ruppert2012-02-12
|
* Use size_t instead of intChristian Ruppert2012-02-12
|
* Remove unused/useless function single_user()Christian Ruppert2012-02-11
|
* fstabinfo: add --remount optionWilliam Hubbs2012-01-31
| | | | | | | | | | This adds a --remount/-R option to fstabinfo. This new option works like --mount, but it adds the necessary options to remount a file system that is already mounted. Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com> X-Gentoo-Bug: 401573 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401573
* Complain about loading /etc/conf.d/rcWilliam Hubbs2012-01-30
| | | | | | | | Openrc was quietly loading this file if it existed and this was causing some issues, so now openrc loads the file and complains about it. Hopefully the warning message will convince everyone to remove this file and migrate the settings to @SYSCONFDIR@/rc.conf where they belong.
* Do not unlink the temp. log during shutdownChristian Ruppert2012-01-28
| | | | | | | Also ignore errors in case of EROFS (Read-Only file systems) Reported-by: Maxim Kammerer X-Gentoo-Bug: 401115 X-Gentoo-Bug-URL: https://bugs.gentoo.org/401115
* Do not loop flock()Christian Ruppert2012-01-28
| | | | | | | | | | There's no need to loop until flock was successfully as flock() would simply block till a previous lock has been released. There's more to do to fix it properly, see my comments in the patch. Reported-by: James Le Cuirot <chewi@aura-online.co.uk> X-Gentoo-Bug: 360013 X-Gentoo-Bug-URL: https://bugs.gentoo.org/360013
* Add -W/--writable function to checkpathChristian Ruppert2012-01-26
| | | | | | | | Checkpath -W will use access(3p) to determine whether or not a path is writable. This is more accurate than test(1p) because it also takes into account whether or not the filesystem is mounted read-only. Modified by William Hubbs to add the man page update.
* WhitespaceChristian Ruppert2012-01-26
|
* Add is_writable() function to check whether a path is writable or notChristian Ruppert2012-01-26
|
* Disable parallel startup in interactive modeChristian Ruppert2012-01-24
|
* Override rc.conf options onlyChristian Ruppert2012-01-24
|
* Per the systemd tmpfiles implementation, we need to watch out for umask ↵Robin H. Johnson2012-01-23
| | | | | | during initial creation of files as well as potentially changing permissions later. Also do not abort if the items exist already, per truncate rules in tmpfiles. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Ensure that when -F is passed, existing files are truncated properly.Robin H. Johnson2012-01-23
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Respin features.h usage so that we correctly test for features before we use ↵Robin H. Johnson2012-01-23
| | | | | | them. Some BSD libc implementations may have one or the other flag, but not both. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Revert "Drop include for features.h"Robin H. Johnson2012-01-23
| | | | This reverts commit 30a565f80d6056ccabadf77e347cf17067133f7e.
* Drop include for features.hWilliam Hubbs2012-01-22
| | | | | | | | | | | | | | | The following information is taken from the feature_test_macros man page: <features.h> is a Linux/glibc-specific header file. Other systems have an analogous file, but typically with a different name. This header file is automatically included by other header files as required: it is not necessary to explicitly include it in order to employ feature test macros. Reported-by: Tibor Vago <tibor.vago@gmail.com> X-Gentoo-Bug: 399635 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=399635
* small style fixWilliam Hubbs2012-01-20
|
* style fixesWilliam Hubbs2012-01-16
|
* Add "ifstopped" command to runscriptChristian Ruppert2012-01-15
| | | | Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
* Allow overriding of rc.conf options via kernel cmdlineChristian Ruppert2012-01-15
| | | | | | | | This adds a new function that allows us to override some specific rc.conf options via the kernel cmdline aka /proc/cmdline. This makes esp. sense in cases where a rc_parallel enabled system has boot issues. Simply disable rc_parallel by appending rc_parallel=no to your kernel cmdline.
* Rename proc_getent to rc_proc_getent and make it globalChristian Ruppert2012-01-15
|
* rc/checkpath: tmpfiles.d backend creation codeRobin H. Johnson2012-01-09
| | | | | | | | | | This commit provides the checkpath applet with feature parity to systemd's tmpfiles.c create_item function. Very similarly to the systemd function, it does NOT do any of the cleanup work in this function. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Do not exit immediately when a service has been stopped alreadyChristian Ruppert2011-12-31
| | | | | | | | | | | | | | | The old behaviour was to exit(EXIT_SUCCESS) in case the service has been stopped already, even if further commands has been passed to the init script (like zap, start). So using for example /etc/init.d/foo stop zap start would abort immediately after "stop" if the service has been stopped already. Though there may be cases were we need it to proceed with the remaining commands, zap and start in this case. This patch fixes the behaviour to continue and proceed with the remaining commands whenever necessary. X-Gentoo-Bug: 371845 X-Gentoo-Bug-URL: https://bugs.gentoo.org/371845
* Code style fixesChristian Ruppert2011-12-30
|
* Compare stricter in proc_getentChristian Ruppert2011-12-30
| | | | | | The new proc_getent compares stricter so that e.g. "ro" doesn't match root=/dev/sdaN anymore. So it has to be either "ro" or "ro=".
* Don't try to write the log during sysinitChristian Ruppert2011-12-29
| | | | | | | | During the sysinit and shutdown runlevels the logfile destination may be read-only. Skip the error messages in this case. X-Gentoo-Bug: 390645 X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645
* Use RC_LEVEL_SHUTDOWNChristian Ruppert2011-12-29
|
* Remove useless rc_runlevel_get() callChristian Ruppert2011-12-29
| | | | The current runlevel will be passed to rc_logger_open() already.
* Don't print error when the logfile isn't writeable during shutdownChristian Ruppert2011-12-29
| | | | | | | | | | | The logfile or its basedir may be read-only during shutdown because the directory may be umounted or read-only remounted already. In this case we simply skip this error. This is related to a comment in bug 390645 but the initial bug is not fixed through this commit. X-Gentoo-Bug: 390645 X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645
* fix compile errorWilliam Hubbs2011-12-11
| | | | | | | | | A variable used in the previous commit was actually removed in another commit; that is why I didn't catch it. Reported-by: Duncan < 1i5t5.duncan@cox.net> X-Gentoo-Bug: 394369 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=394369
* Allow init scripts to be executed with a relative pathWilliam Hubbs2011-12-11
| | | | | | | | | | This was a regression that was caused by the fix for http://bugs.gentoo.org/show_bug.cgi?id=350910. I am reverting the commit that we said fixed that bug and re-opening it. Reported-By: Nathaniel <nathaniel@paust.us X-Gentoo-Bug: 392457 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392457
* rc: usage: do not output non-printable short options in usageMike Frysinger2011-11-19
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* rc: usage: optimize help string alignment output a littleMike Frysinger2011-11-19
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* rc: fix style around case_RC_COMMON_GETOPTMike Frysinger2011-11-19
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* make shell math operations style more succulentMike Frysinger2011-11-19
| | | | | | | | | | | Convert the style: var=$((${var} + 1)) to: : $(( var += 1 )) The latter is easier to read imo. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix compile warningWilliam Hubbs2011-11-17
|
* add support for extra_stopped_commandsWilliam Hubbs2011-11-16
|
* mountinfo: Do not error out if realpath failsMike Frysinger2011-11-15
| | | | | | Reported-By: Dennis Schridde <devurandom@gmx.net> X-Gentoo-Bug: 383333 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=383333
* ssd: fix building when SYS_ioprio_set is missingMike Frysinger2011-11-09
| | | | | | Older glibc's might not provide this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* add auto detection for lxcWilliam Hubbs2011-11-07
| | | | | | Reported-by: Francesco Riosa <francesco+gentoo_bugzilla@pnpitalia.it> X-Gentoo-Bug: 384151 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=384151
* Use pattern rules instead of suffix rulesWilliam Hubbs2011-10-29
| | | | | | Rework the makefiles to use pattern rules instead of suffix rules. This is the preferred way to write implicit rules according to the gnu make manual.
* Use the real/actual path when looking for mountsChristian Ruppert2011-09-08
| | | | /proc/mounts contains real/actual paths so we should do the same in mountinfo.
* Remove unused variableChristian Ruppert2011-09-08
|
* Do not ignore return code for custom script functionsFlex2011-09-02
| | | | | X-Gentoo-Bug: 380317 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380317