summaryrefslogtreecommitdiff
path: root/src/rc
Commit message (Collapse)AuthorAge
* Rename runscript to openrc-runHEADmasterWilliam Hubbs2013-12-29
| | | | | | | | | | 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
* add openrc binary to ignore patternsWilliam Hubbs2013-12-13
|
* runscript: clarify the message wrt schedulingWilliam Hubbs2013-12-13
| | | | | | | | 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
* Rename the rc binary to openrcWilliam Hubbs2013-12-12
| | | | | | | | | | | 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
* rc-update: make "service already installed" message informationalWilliam Hubbs2013-12-01
| | | | | | 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.
* Begin port to GNU/kFreeBSDSteven Chamberlain2013-10-30
| | | | | This is just a minimal port to get Debian up and running; the rest will be done later.
* Revert "Make einfo routines private"William Hubbs2013-10-21
| | | | | | This reverts commit de88aff0a839844526ae262f8961ec4372fed238. I was advised that splashutils links to libeinfo, so we do have a consumer for this library.
* convert flock() messages to verbose warningsWilliam Hubbs2013-10-12
| | | | | | | | | | 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
* start-stop-daemon: fix do_stop callsWilliam Hubbs2013-10-06
| | | | | | | | | 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.
* 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
* 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
* 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>
* 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
* 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
* 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..
* 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>
* 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>
* 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
* 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
* 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.