summaryrefslogtreecommitdiff
path: root/sh/runscript.sh.in
Commit message (Collapse)AuthorAge
* Drop restart_pre/restart_postWilliam Hubbs2012-09-25
| | | | | | | | By design, restart is hard coded to run stop followed by start along with all of the pre/post functions associated with them. Restart doesn't need its own pre/post functions since it is possible to make any function in an init script behave differently for a restart command by testing against the RC_CMD environment variable.
* Add restart_pre/restart_post support, also document RC_CMDChristian Ruppert2012-09-22
|
* fix references to functions.shWilliam Hubbs2012-04-26
| | | | | | | There were a couple of places where we were sourcing functions.sh in @SYSCONFDIR@/init.d. This is only a backward compatibility symlink, so it should not be used for openrc. The correct place to source this from is @LIBEXECDIR@/sh.
* Change the working directory for depend onlyWilliam Hubbs2012-04-26
| | | | | | We already have a special case for depend processing, so we should change the working directory there only. This prevents us from forcing all init scripts to be run in the init directory.
* Revert "Revert "Let runscript enter the service dir before expand globs""William Hubbs2012-04-26
| | | | | | This reverts commit f971c4c0b5e45500f1255f2e076f2c101d2f9281. After further discussion, this is a good first step toward a fix, so I am putting it back.
* Revert "Let runscript enter the service dir before expand globs"William Hubbs2012-04-26
| | | | | This reverts commit 9d0dce35c3e46b4515499f3f0f1c47645be0bc48. This is being reverted due to the fix still being under discussion.
* Let runscript enter the service dir before expand globsChristian Ruppert2012-04-26
| | | | | | | | | | | | Enter the service directory, like gendeps.sh does, to make sure globs are expanded in it rather than in /. That makes sure that globbing like "need *" will end up in all files of the init.d directory. Signed-off-by: Christian Ruppert <idl0r@gentoo.org> Reported-by: Guenther Brunthaler <gb_about_gnu@gmx.net> X-Gentoo-Bug: 412677 X-Gentoo-Bug-URL: https://bugs.gentoo.org/412677
* Runscript: allow extra_commands to be run in chrootsWilliam Hubbs2012-03-03
| | | | | | | | | | | | | The commands defined in the extra_commands variable do not depend on whether the service is stopped or started, so it is valid to run them in chroot environments. Also, add a note to the runscript man page about the commands in extra_commands being able to run whether or not the service is started. Reported-by: Robin Johnson <robbat2@gentoo.org> X-Gentoo-Bug: 406713 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406713
* cgroups: only create the cgroup when the service is being startedWilliam Hubbs2012-01-29
|
* Use "checkpath -W" instead of dir_writable()Christian Ruppert2012-01-28
|
* Check if /sys/fs/cgroup/openrc is writableChristian Ruppert2012-01-28
|
* cgroups: add all services to the openrc cgroupWilliam Hubbs2012-01-26
| | | | | This is a modified version of a patch originally submitted by Patrick Lauer <patrick@gentoo.org>.
* Make checks for writable directory posix compliantWilliam Hubbs2012-01-22
| | | | | | Reported-by: Maxim Kammerer <mk@de.su> X-Gentoo-Bug: 398931 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=398931
* drop the extra --pidfile optionWilliam Hubbs2012-01-17
|
* Use the "--make-pidfile" when command_background is usedChristian Ruppert2012-01-17
| | | | | | | | | | The start-stop-daemon "--make-pidfile" option is now used by default when using command_background, this requires a pidfile to be specified. Document command_background option. Reported-by: Giampaolo Tomassoni <giampaolo@tomassoni.biz> X-Gentoo-Bug: 399165 X-Gentoo-Bug-URL: https://bugs.gentoo.org/399165
* Add "retry" option for the stop() templateChristian Ruppert2011-12-31
|
* cgroups: remove references to the "openrc" cgroupWilliam Hubbs2011-12-19
| | | | Openrc will set up cgroups the way the kernel documentation recommends.
* 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
* CGroups: create the openrc cgroup hierarchyWilliam Hubbs2011-11-20
| | | | | | Openrc will create a cgroup hierarchy called openrc which will have all services it starts and all subsystems attached to it. If you need other groups/hierarchies, please use libcgroup.
* CGroups: /sys/fs/cgroups should be a tmpfsWilliam Hubbs2011-11-18
| | | | | | | | | | | The kernel documentation states that a cgroup file system should not be mounted here, but a tmpfs. This also means that we should not create a group for each process, but we should allow the user to specify which group a process should be assigned to. The rc_cgroup variable will be used for this purpose. For more information, see /usr/src/linux/Documentation/cgroups/cgroups.txt.
* CGroups: fix group initializationWilliam Hubbs2011-11-18
| | | | | Make sure cpuset.cpus and cpuset.mems exist in the parent group before attempting to copy them to the new group.
* CGroups: finish initializing the CGroupWilliam Hubbs2011-11-17
| | | | | | When a CGroup is created, we need to copy cpuset.cpus and cpuset.mems from the new group's parent into the new group before we can attach any processes to it.
* Change RC_CGROUP to lower caseWilliam Hubbs2011-11-17
|
* Add CGroup supportPatrick Lauer2011-11-17
| | | | | X-Gentoo-Bug: 390297 X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=390297
* add support for extra_stopped_commandsWilliam Hubbs2011-11-16
|
* Make sure we load external scripts before using eerrorWilliam Hubbs2011-11-02
| | | | | | Reported-by: Jochen Schlick <josch06@gmail.com> X-Gentoo-Bug: 388715 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=388715
* fix random typosMike Frysinger2011-10-16
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* runscript: simplify livecd-functions.sh loadingMike Frysinger2011-09-18
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Improve processing of service directories and conf.d filesWilliam Hubbs2011-07-31
| | | | | | | | | | | symbolic links should not be followed in an attempt to work out the name of the service we are running. Also, @sysconfdir@/conf.d should be tried as a backup directory for configuration files. I would like to thank Robin Johnson for his input on this change. X-Gentoo-Bug: 350910 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=350910
* Runscript: print deprecation warning for opts variableWilliam Hubbs2011-07-26
| | | | | | | | | | | Openrc uses the extra_commands and extra_started_commands variables to list extra commands for services. Also, it supports the opts variable which is used to assist migration from baselayout-1. I am adding this warning to encourage switching from opts to extra_commands/extra_started_commands. I would like to remove support for opts eventually.
* drop useless "All rights reserved" noticeMike Frysinger2011-06-29
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* do not run services if openrc did not boot the systemWilliam Hubbs2011-05-11
| | | | | X-Gentoo-Bug: 364159 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=364159
* more whitespace cleanupMike Frysinger2011-01-17
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* bug 351160: make openrc exit codes LSB compliantEray Aslan2011-01-12
| | | | | | * status on a stopped service now has a return code of 3 (was 1) * starting an already started service now has a return code of 0 (was 1) * stopping an already stopped service now has a return code of 0 (was 1)
* bug 328675: add error checking to runscript.shWilliam Hubbs2011-01-12
| | | | | | | runscript.sh needs to abort if the . command used to load conf.d files and the service script does not execute successfully. I would like to thank Mike Frysinger for his input wrt style on this patch.
* Fix rc_${rc_svcname}_need.Roy Marples2010-02-20
| | | | Display config depends in service depend function also.
* Allow init scripts to show their dependencies easierRoy Marples2009-09-04
|
* We need to use eval so we can pass "*" as an argument.Roy Marples2009-05-26
|
* Move non compiled libraries from /lib/rc to /libexec/rcRoy Marples2009-05-23
| | | | | | | | OpenRC version is now stored as plaintext in /libexec/rc/version Plugins (cursplash, splashutils) will have to be re-compiled to pickup the new directories. State data needs to be moved from /lib/rc/init.d to /libexec/rc/init.d as well.
* Add (c) to CopyrightRoy Marples2009-05-01
|
* Allow templates to define a stop signalRoy Marples2009-04-27
|
* Stop using needless {} in varsRoy Marples2009-04-26
|
* Allow user to provide custom status function and still hook into the system oneRoy Marples2009-04-18
|
* Move status to runscript.sh so init scripts can override it, #159Roy Marples2009-04-18
| | | | | Return 32 if crashed, #163
* Always define template start/stop functions so that the real script name ↵Roy Marples2008-04-26
| | | | isn't hidden when errors are in the real start/stop functions, Gentoo #219179
* Fix logic for templates.Roy Marples2008-04-21
|
* Punt is_function in favour of POSIX shell builtin command, thanks to Harald ↵Roy Marples2008-04-21
| | | | van Dijk for the idea.
* We should check type output to ensure that we're really calling a shell ↵Roy Marples2008-04-18
| | | | function and not some badly named binary like stop from boinc, Gentoo #218063.
* Try and fix more prefix stuff.Roy Marples2008-03-25
|
* SVCNAME -> RC_SVCNAME, but export SVCNAME still for compat.Roy Marples2008-03-19
|