aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-06-20librc: filter out container processes on OpenVZ hostWilliam Hubbs
Thanks to info and testing done by Daniel Robbins <drobbins@funtoo.org>, there is now a fix for this. Below is his description of the steps OpenRC needed to use. 1) See if /proc/<pid>/status exists 2) If it does, see if it has a "envID:" field 3) If it does, see if "envID:" is set to "0" 4) If so, then it's one of the host's processes and should be a candidate for the list. Otherwise, it is one of the container's processes and should be ignored. This should fix the bug and allow start-stop-daemon to work properly on OpenVZ hosts. X-Gentoo-Bug: 376817 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=376817
2014-01-18fstabinfo: fix mount and remountWilliam Hubbs
The mount and remount options should always be processed. They were only being processed if -q was not on the command line. X-Gentoo-Bug: 498206 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=498206
2014-01-13rc-update: add option to remove a service from all runlevelsBenda Xu
The -a option,which only applies to the del command, is used to remove a service from all runlevels. X-Gentoo-Bug: 497740 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=497740
2013-12-29Rename runscript to openrc-runWilliam Hubbs
This was requested by Debian, because the minicom software, which is available on Debian and other distros, has a binary named runscript. We are keeping a backward compatibility symlink for now, but this allows Debian or any other distro to safely remove the symlink. X-Gentoo-Bug: 494220 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-13add openrc binary to ignore patternsWilliam Hubbs
2013-12-13runscript: clarify the message wrt schedulingWilliam Hubbs
The message about a service being scheduled to start was confusing to some of our users; I was told this wording is more clear. X-Gentoo-Bug: 493070 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493070
2013-12-12Rename the rc binary to openrcWilliam Hubbs
Debian requested this rename due to the "rc" binary conflicting with the "rc" binary from the plan 9 shell. We also add a deprecation warning to the binary when it is run as rc to encourage users to switch to openrc instead. X-Gentoo-Bug: 493958 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493958
2013-12-01rc-update: make "service already installed" message informationalWilliam Hubbs
This message was being sent to stderr, and it should be sent to stdout since it is informational. This change was requested by zero_chaos.
2013-10-30Begin port to GNU/kFreeBSDSteven Chamberlain
This is just a minimal port to get Debian up and running; the rest will be done later.
2013-10-21librc: do not allow "." and ".." as runlevel namesWilliam Hubbs
The rc_runlevel_exists function was attempting to treat "." and ".." as valid runlevels; however, this should not be allowed. X-Gentoo-Bug: 488710 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=488710
2013-10-21Revert "Make einfo routines private"William Hubbs
This reverts commit de88aff0a839844526ae262f8961ec4372fed238. I was advised that splashutils links to libeinfo, so we do have a consumer for this library.
2013-10-12convert flock() messages to verbose warningsWilliam Hubbs
Convert these messages to warnings that are only displayed if EINFO_VERBOSE is set to yes in the environment. This is based on a suggestion from Patrick Lauer <patrick@gentoo.org>. X-Gentoo-Bug: 487588 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487588
2013-10-06start-stop-daemon: fix do_stop callsWilliam Hubbs
Several calls to do_stop were forcing the test parameter to be true, which was causing extra output to the terminal, such as: * Would send signal 0 to pid xxxxx This should only happen if the --test command line option was used.
2013-10-04librc: fix a read off-by-one bugNatanael Copa
We should first check if we are within bounds and then read rather than the opposite. This makes valgrind happy. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2013-10-04librc: fix off-by-one bugNatanael Copa
We need allocate space for both the added leading '-' and the trailing '\0'. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2013-09-30start-stop-daemon: fix eerorr calls in get_pidWilliam Hubbs
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.
2013-09-26Make einfo routines privateWilliam Hubbs
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.
2013-09-24start-stop-daemon: remove the verbose variableWilliam Hubbs
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.
2013-09-23start-stop-daemon: remove the quiet variableWilliam Hubbs
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
2013-09-23rc: add service to ignore patternsWilliam Hubbs
2013-09-23style fixesWilliam Hubbs
2013-09-20Fix stacked runlevel supportAlexander V Vershilov
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
2013-09-03rc: add support for suppressing error messagesWilliam Hubbs
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
2013-09-03libeinfo: add separate variable to suppress eerror messagesWilliam Hubbs
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
2013-08-28libeinfo: suppress output for eerror* functionsWilliam Hubbs
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
2013-08-27Revert "Libeinfo: do not suppress ewarn() messages"William Hubbs
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
2013-08-26start-stop-daemon: remove redundant test of the quiet valueWilliam Hubbs
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.
2013-08-26start-stop-daemon: fix --quiet switchWilliam Hubbs
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
2013-07-25Add support for DragonFly BSDGary
2013-07-19rc-status: fix typoAlexander V Vershilov
X-Gentoo-Bug: 477318 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477318
2013-07-16rc-status: fix -a to show all servicesAlexander V Vershilov
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
2013-05-02Add service appletWilliam Hubbs
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
2013-05-01fix the build for non-selinux systemsWilliam Hubbs
The symlinks should be created only if MKSELINUX=yes, not if it just has a value.
2013-04-28rc: allow switching runlevels without stopping servicesWilliam Hubbs
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
2013-04-09Fix autodetection of lxcNatanael Copa
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>
2013-02-25rc-service: add usage messageAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-25rc-status: improve usage message accuracy and consistencyAndrew Gregory
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>
2013-02-25rc-update: improve usage message accuracy and consistencyAndrew Gregory
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>
2013-02-25rc: add usage messageAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-23make BINDIR and SBINDIR available to input filesAndrew Gregory
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>
2013-02-15runscript: retry prefix flock if it is interrupted by a signalAlexander Mezin
Reported-by: Pacho Ramos <pacho2@gentoo.org> X-Gentoo-Bug: 434800 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434800
2013-01-04libeinfo: check for "color" in the terminal nameAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-01-02Add tools directoryWilliam Hubbs
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.
2012-12-03Do not add a prefix to the /run directoryWilliam Hubbs
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
2012-10-27Checkpath: print the path when correcting the ownerWilliam Hubbs
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
2012-10-24mountinfo: respect the -q command line optionWilliam Hubbs
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
2012-10-17Spacing fixesWilliam Hubbs
2012-10-09checkpath: fix bool valuesWilliam Hubbs
Use true/false for bool values instead of 0/1. Reported-by: <vapier@gentoo.org>
2012-10-09checkpath: change the owner/group only when requested to do soWilliam Hubbs
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
2012-10-04set the RC_UNAME environment variable when updating dependenciesWilliam Hubbs
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>