aboutsummaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
AgeCommit message (Collapse)Author
2011-05-23Fix dirname calls in runscriptChristian Ruppert
runscript will try to get the dir and basename of a file/link in case it contains at least one slash. This patch gives a temporary copy of the path to the dirname() function since dirname() can modify its argument.
2011-01-17Clean up all trailing whitespace in src/.Robin H. Johnson
2011-01-12bug 351160: make openrc exit codes LSB compliantEray Aslan
* 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)
2010-12-03Avoid race condition in runscript (bug #319865)Thomas Pfaff
Under normal conditions, runscript creates one child and waits for its termination, which is signaled by a pipe write from the SIGCHLD sighandler. When running killprocs however more than one SIGHCLD signal is generated, at least on all of my amd64 boxes running on real hardware and in vmware. When the first SIGCHLD occurs svc_exec leaves the loop and closes the pipe. Subsequent SIGCHLDs during the close can lead to a race condition and create an EBADF error in the pipe write (pipe is closed but the file handle is still != -1). We avoid this by blocking SIGHCHLD during the pipe close.
2010-04-09restore init.d pause optionMike Frysinger
2010-03-17Fix two leaks.Roy Marples
2010-01-08random spelling fixesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-04Allow init scripts to show their dependencies easierRoy Marples
2009-07-01We should use -feature instead of nofeature.Roy Marples
This matches the ifconfig and Gentoo USE flag syntax and is hopefully easier to read. Fixes #178.
2009-06-01Warn about going inactive correctly.Roy Marples
2009-05-23Move non compiled libraries from /lib/rc to /libexec/rcRoy Marples
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.
2009-05-17If already started or stopped, abort.Roy Marples
2009-05-05Fix compile on NetBSD and FreeBSDRoy Marples
2009-05-01Add (c) to CopyrightRoy Marples
2009-04-30Add -Z, --dry-run option to show which services we would start/stopRoy Marples
without actually doing so. Fixes #151.
2009-04-30Avoid more gcc warning about not checking return values ...Roy Marples
2009-04-30Fix parensJuan RP
2009-04-28Don't start services when their need dependency is brokenRoy Marples
2009-04-24Cast to intRoy Marples
2009-04-24Describe interval unitsRoy Marples
2009-04-23Improve style for KNFRoy Marples
2009-04-23Improve the service timeout code and reduce the timeout to 60 seconds.Roy Marples
Don't process any dependencies when changing runlevels and called outside of RC otherwise we can deadlock.
2009-04-18Don't leak the lock fd.Roy Marples
2009-04-18Fix compile on FreeBSD.Roy Marples
2009-04-18Move status to runscript.sh so init scripts can override it, #159Roy Marples
Return 32 if crashed, #163
2009-04-17Using fifos for locking can be error prone.Roy Marples
flocks are safer, as we only use tmpfs for our lock files. I don't know how this works for inactive just yet though ...
2009-01-13yes should be YESRoy Marples
2009-01-12We now warn about clock skewsRoy Marples
rc-update -u will force a regen of the dep tree rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime
2008-12-23Our error messages don't have full stops at the endRoy Marples
2008-12-23Typo.Roy Marples
2008-12-23Disallow hotplug to run during sysinit, but allow elsewhere. Fixes #131.Roy Marples
2008-12-11Warn about stopping sysinit services, thanks to Matthias Schwarzott. Fixes #126.Roy Marples
2008-11-27Not needed.Roy Marples
2008-11-27Switch from select to poll and improve the no prefixing of eend calls.Roy Marples
2008-11-23Don't warn about waiting for services marked as notimeout, Gentoo #247306.Roy Marples
2008-11-03Add a new shutdown runlevel, Gentoo #224537.Roy Marples
Split halt.sh into halt, killprocs, romount and savecache services. The reboot runlevel is removed but mapped to shutdown. The halt script should be moved to the sysvinit package.
2008-10-30We no longer hotplug by default.Roy Marples
2008-10-10Remove coldplug and just have hotplug which is a list of allowed/disallowed ↵Roy Marples
services. Makes things much easier.
2008-10-10sysinit is now a real runlevel that handles things like udev, dmesg andRoy Marples
mounting various bits in /dev and /sys. init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems) To make development of this easier we now return an empty RC_STRINGLIST instead of a NULL for empty things. If you don't have a udev init script installed, don't reboot your box OR roll back to an older OpenRC version.
2008-10-08Clean up warnings regarding printf.Roy Marples
2008-10-06#ifdef atexit cleanups calling free as the OS should do this for us, but ↵Roy Marples
valgrind debuggers need it.
2008-09-27Use flock to lock PREFIX_LOCK so that multiple processes can cleanly write ↵Roy Marples
to the same tty.
2008-09-27Warn when waiting for a service every few seconds.Roy Marples
2008-09-18Use the new rc_stringlist_find function.Roy Marples
2008-09-18Clean up some compile warnings.Roy Marples
2008-06-10When we have dependant scheduled services, don't error if a need is stopped.Roy Marples
2008-05-12The real fix for the last commit is to uncomment some code - d'oh.Roy Marples
2008-05-12When stopping, stop services that need our provide as well, #79.Roy Marples
2008-05-12Check we have a deptree before using it, Gentoo #220579Roy Marples
2008-04-29Tweak the last commit and fix a valgrind error.Roy Marples