summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* start-stop-daemon: fix eerorr calls in get_pidWilliam Hubbs2013-09-30
| | | | | | The eerror calls in this function make it too verbose, so change them to ewarnv() calls instead. This means that they will only print if the --verbose option is used or EINFO_VERBOSE=yes is set in the environment.
* Make einfo routines privateWilliam Hubbs2013-09-26
| | | | | | The libeinfo library has no consumers other than OpenRC, so there is no reason for it to be maintained as a library. The einfo routines are now an object that links with the rc binary.
* start-stop-daemon: remove the verbose variableWilliam Hubbs2013-09-24
| | | | | | Along the same lines as the quiet variable, this is controlled by an environment variable for the einfo code, so we do not need a separate boolean flag.
* start-stop-daemon: remove the quiet variableWilliam Hubbs2013-09-23
| | | | | | | | The suppression of output is controlled in the e* functions themselves, so there is no need for a variable to test in start-stop-daemon. X-Gentoo-Bug: 482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
* rc: add service to ignore patternsWilliam Hubbs2013-09-23
|
* style fixesWilliam Hubbs2013-09-23
|
* Fix stacked runlevel supportAlexander V Vershilov2013-09-20
| | | | | | | | | | | | | | | Patch was provided by Max Hacking <max.gentoo.bugzilla@hacking.co.uk> and slightly fixed by Alexander Vershilov <qnikst@gentoo.org> and William Hubbs <williamh@gentoo.org>. Fixes: 1). Rebase to newest OpenRC version. 2). Remove code style fixes. Port to currect code style. 3). Fix rc_runlevel_stack instead of introducing new function. 4). Make get_runlevel_chain a private function. X-Gentoo-Bug: 467368 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467368
* rc: add support for suppressing error messagesWilliam Hubbs2013-09-03
| | | | | | | | Add support for suppressing error messages with --quiet specified twice on the command line. X-Gentoo-Bug: 482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
* libeinfo: add separate variable to suppress eerror messagesWilliam Hubbs2013-09-03
| | | | | | | | | | Add an EERROR_QUIET environment variable which works like EINFO_QUIET but for the eerror functions. This will allow library consumers to choose whether to suppress eerror messages separately from einfo and ewarn messages. X-Gentoo-Bug: 482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
* libeinfo: suppress output for eerror* functionsWilliam Hubbs2013-08-28
| | | | | | | | This makes the eerror* functions honor the EINFO_QUIET environment variable like the einfo* and ewarn* functions. X-Gentoo-Bug: 482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396
* Revert "Libeinfo: do not suppress ewarn() messages"William Hubbs2013-08-27
| | | | | | | | | | | | | | | This reverts commit 4ee62c7903c65557c493f51d6703264a816156cd. The previously referenced commit broke consistency because ewarnx() was respecting the EINFO_QUIET environment setting, but after this commit, ewarn() was not. Also, due to discussion on the below referenced bugs, I think we do want to suppress warnings when EINFO_QUIET=yes. X-Gentoo-Bug: 482396 X-Gentoo-Bug: 439174 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439174
* start-stop-daemon: remove redundant test of the quiet valueWilliam Hubbs2013-08-26
| | | | | | The einfo() function tests for the EINFO_QUIET environment variable directly, and this is the variable that is set by the --quiet flag, so there was no reason for this test to exist.
* start-stop-daemon: fix --quiet switchWilliam Hubbs2013-08-26
| | | | | | | | | | The --quiet switch wasn't really quiet, because we changed it to report errors. I am changing it back due to discussions on the listed bugs. X-Gentoo-Bug: 482396 X-Gentoo-Bug: 439174 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=482396 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439174
* Add support for DragonFly BSDGary2013-07-25
|
* rc-status: fix typoAlexander V Vershilov2013-07-19
| | | | | X-Gentoo-Bug: 477318 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477318
* rc-status: fix -a to show all servicesAlexander V Vershilov2013-07-16
| | | | | | | | We need to unset rc_svcname so that all of the services are added to the list to display. X-Gentoo-Bug: 409787 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409787
* Add service appletWilliam Hubbs2013-05-02
| | | | | | | | | The service applet is equivalent to rc-service. This was added so that we will be more compatible with Debian and Fedora. Reported-by: cardoe@gentoo.org X-Gentoo-Bug: 468168 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=468168
* fix the build for non-selinux systemsWilliam Hubbs2013-05-01
| | | | | The symlinks should be created only if MKSELINUX=yes, not if it just has a value.
* rc: allow switching runlevels without stopping servicesWilliam Hubbs2013-04-28
| | | | | | | | | | | OpenRC, by default, stops all services that are not listed in a runlevel when rc is used to switch runlevels. This adds a -n/--no-stop command line option to rc which tells it to skip stopping the services which are not in the runlevel. Reported-by: gentoo@thoth.purplefrog.com X-Gentoo-Bug: 372585 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=372585
* Fix autodetection of lxcNatanael Copa2013-04-09
| | | | | | | | | The /proc/1/environ contains various \0 terminated strings. The current code will only work when the search string is in the first of those. To fix this we look for strings in entire buffer. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* rc-service: add usage messageAndrew Gregory2013-02-25
| | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* rc-status: improve usage message accuracy and consistencyAndrew Gregory2013-02-25
| | | | | | | This makes it more clear that many of the options are used as an alternative to a runlevel. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* rc-update: improve usage message accuracy and consistencyAndrew Gregory2013-02-25
| | | | | | | The old message did not indicate that the runlevel argument was optional for add and del or that it could be used with show. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* rc: add usage messageAndrew Gregory2013-02-25
| | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* make BINDIR and SBINDIR available to input filesAndrew Gregory2013-02-23
| | | | | | | | | | | BINDIR and SBINDIR can be set independently of PREFIX and may not be set to PREFIX/bin as scripts currently assume. Note from William Hubbs: This adds @BINDIR@ and @SBINDIR@ macros to the sed commands run to convert *.in files to the executable form. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* runscript: retry prefix flock if it is interrupted by a signalAlexander Mezin2013-02-15
| | | | | | Reported-by: Pacho Ramos <pacho2@gentoo.org> X-Gentoo-Bug: 434800 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434800
* libeinfo: check for "color" in the terminal nameAndrew Gregory2013-01-04
| | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* Add tools directoryWilliam Hubbs2013-01-02
| | | | | | | | | This directory will contain tools which are not necessary for OpenRC to run, but which some users have found useful. The first of these is deptree2dot, which converts /run/openrc/deptree to a .dot file for use with graphviz. This can assist in finding circular dependencies.
* Do not add a prefix to the /run directoryWilliam Hubbs2012-12-03
| | | | | | | | This doesn't affect us on gentoo, but on archlinux, which has done the /usr merge, OpenRC was looking for /run under PREFIX. /run is always at the root level, so it shouldn't have prefix appended to it. Reported-by: udeved@openrc4arch.site40.net
* Checkpath: print the path when correcting the ownerWilliam Hubbs2012-10-27
| | | | | | | | | | Checkpath was printing the path it was working with unless it was correcting the owner. In this case, it was printing "checkpath", which is not very useful. Reported-by: <devurandom@gmx.net> X-Gentoo-Bug: 439014 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439014
* mountinfo: respect the -q command line optionWilliam Hubbs2012-10-24
| | | | | | | | | | Previously, we were setting the quiet flag before the command line was parsed. Since the flag is only used once, we can just read the environment variable which is set by the parsing process. Reported-by: <devurandom@gmx.net> X-Gentoo-Bug: 439010 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=439010
* 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>