summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Spacing fixesWilliam Hubbs2012-10-17
|
* checkpath: fix bool valuesWilliam Hubbs2012-10-09
| | | | | | Use true/false for bool values instead of 0/1. Reported-by: <vapier@gentoo.org>
* checkpath: change the owner/group only when requested to do soWilliam Hubbs2012-10-09
| | | | | | | | | Fix checkpath so that it only changes the owner/group if -o is on the command line. Reported-by: <flameeyes@gentoo.org> X-Gentoo-Bug: 437560 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=437560
* set the RC_UNAME environment variable when updating dependenciesWilliam Hubbs2012-10-04
| | | | | | | This is needed because the network script uses this variable in the depend() function but it wasn't exported when this was run. Reported-by: <aaly90@gmail.com>
* fix RC_SVCDIR on prefix systemsWilliam Hubbs2012-09-20
| | | | | | | | On prefix systems, RC_SVCDIR was being defined based on the host operating system. This is not correct because there will not be a /run directory in a prefix. This commit moves RC_SVCDIR on prefix systems to the same location as on non-Linux systems.
* Typo: emtpy -> emptyChristian Ruppert2012-09-14
| | | | | | Reported-by: Walter <walter@pratyeka.org> X-Gentoo-Bug: 430146 X-Gentoo-Bug-URL: https://bugs.gentoo.org/430146
* Silence the right get_pid() callChristian Ruppert2012-09-12
|
* Silence get_pid(), OpenRC will give the process some time to create the PID ↵Christian Ruppert2012-09-12
| | | | file and the first get__pid() call may fail.
* add RC_PREFIX environment variableWilliam Hubbs2012-09-09
| | | | | This will be used by init scripts which want to be able to run in a Gentoo Prefix installation. RC_PREFIX will contain the prefix offset.
* Do not silence errorsChristian Ruppert2012-08-19
|
* Fix quiet usageChristian Ruppert2012-08-18
| | | | | EINFO_QUIET will always been unset when we first do unsetenv("EINFO_QUIET") and later query it again anyway..
* Bring Back prefix supportWilliam Hubbs2012-07-26
| | | | | We now have a team member who is interested in OpenRC on prefix, so I am bringing it back to the main tree.
* rc: fix inverted string compare logicMike Frysinger2012-05-23
| | | | | | | X-Gentoo-Bug: 417227 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=417227 Reported-by: sphakka <marcoep@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* rc: fix thinko in applet collapseMike Frysinger2012-05-16
| | | | | | | We want to lookup the service based on the applet name. Reported-by: Christian Ruppert <idl0r@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* move rc_svcdir to /run/openrc on Linux systemsWilliam Hubbs2012-05-14
| | | | | | | | | | | | | | | If you are not using linux, this should not affect you. If you are using linux, from this point forward, openrc requires the /run directory to be a mounted tmpfs. If it is, you can run @LIBEXECDIR@/sh/migrate-to-run.sh as root to migrate your dependency tree and state information to the new location. If it is not, you must create the /run directory as root with permissions 755 then reboot your system. reported-by: Maxim Kammerer <mk@dee.su> X-Gentoo-Bug: 401059 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401059
* rc: collapse the applet if statements into a single array walkMike Frysinger2012-05-06
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* add a new ARRAY_SIZE macro and use itMike Frysinger2012-05-06
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* split out librc-independent helpers into a dedicated header fileMike Frysinger2012-05-06
| | | | | | | Many of these helpers are not special to librc, so split them out so they can be used in all source trees (including libeinfo). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Reduce overhead by leaving rc_deptree_update_needed() as soon as possibleChristian Ruppert2012-04-26
| | | | | | There's no need to check any further if we're returning true anyway. Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
* Disable some questionable linesChristian Ruppert2012-04-26
| | | | | | | | | | | | | | | | | | | Caused by bug 412589 I was looking at the do_mark_service() function and quickly found that the segfault is caused by a strlen() call against a NULL pointer. I also noticed it's using "/exclusive/%s.%s" so svcname.pid, all other functions are just using the svcname.. So it seems that svcname.pid was/is never used and thus not necessary at all. In relation to the above, the if statement in the do_mark_service() function ("if (ok && svcname && strcmp(svcname, service) == 0) {") needs to be fixed/improved as svcname and service are almost always equal, see my comment in the function for further details. Signed-off-by: Christian Ruppert <idl0r@gentoo.org> Reported-by: Patrick McLean <chutzpah@gentoo.org> X-Gentoo-Bug: 412589 X-Gentoo-Bug-URL: https://bugs.gentoo.org/412589
* Remove duplicate getenv("RC_SVCNAME") callChristian Ruppert2012-04-24
|
* librc: Do not output error messages from within the library.William Hubbs2012-03-26
| | | | | | | | | This fixes a compile issue. Also, it is cleaner to have the client output error messages as opposed to having the library do this. Reported-by: Ewoud Kohl van Wijngaarden <gentoo@kohlvanwijngaarden.nl> X-Gentoo-Bug: 409743 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409743
* 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, itworks on linux and returns NULL on the bsds, but we are definitely open to patches for that side.
* Fix rc_proc_getent() undeclared on BSDChristian Ruppert2012-02-25
| | | | | | X-Gentoo-Bug: 405713 X-Gentoo-Bug-URL: https://bugs.gentoo.org/405713 Reported-by: Dmitri Bogomolov <4glitch@gmail.com>
* Skip pam if running as rootWilliam Hubbs2012-02-23
| | | | | | 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
|