summaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
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
* 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
* 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.
* 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
* 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
* Fix some more warningsChristian Ruppert2012-02-12
|
* Do not loop flock()Christian Ruppert2012-01-28
| | | | | | | | | | There's no need to loop until flock was successfully as flock() would simply block till a previous lock has been released. There's more to do to fix it properly, see my comments in the patch. Reported-by: James Le Cuirot <chewi@aura-online.co.uk> X-Gentoo-Bug: 360013 X-Gentoo-Bug-URL: https://bugs.gentoo.org/360013
* Add "ifstopped" command to runscriptChristian Ruppert2012-01-15
| | | | Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
* Do not exit immediately when a service has been stopped alreadyChristian Ruppert2011-12-31
| | | | | | | | | | | | | | | The old behaviour was to exit(EXIT_SUCCESS) in case the service has been stopped already, even if further commands has been passed to the init script (like zap, start). So using for example /etc/init.d/foo stop zap start would abort immediately after "stop" if the service has been stopped already. Though there may be cases were we need it to proceed with the remaining commands, zap and start in this case. This patch fixes the behaviour to continue and proceed with the remaining commands whenever necessary. X-Gentoo-Bug: 371845 X-Gentoo-Bug-URL: https://bugs.gentoo.org/371845
* fix compile errorWilliam Hubbs2011-12-11
| | | | | | | | | A variable used in the previous commit was actually removed in another commit; that is why I didn't catch it. Reported-by: Duncan < 1i5t5.duncan@cox.net> X-Gentoo-Bug: 394369 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=394369
* 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
* rc: fix style around case_RC_COMMON_GETOPTMike Frysinger2011-11-19
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Remove unused variableChristian Ruppert2011-09-08
|
* Do not ignore return code for custom script functionsFlex2011-09-02
| | | | | X-Gentoo-Bug: 380317 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380317
* 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: rename saveDir back to save to fix compile errorWilliam Hubbs2011-07-26
|
* rename save and save2 for clarityWilliam Hubbs2011-07-20
| | | | | The names saveDir and saveLnk seem to better define how these variables are used.
* Don't write into optarg, this also fixes a compiler warning.Christian Ruppert2011-07-05
|
* drop useless "All rights reserved" noticeMike Frysinger2011-06-29
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix dirname calls in runscriptChristian Ruppert2011-05-23
| | | | | | 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.
* Clean up all trailing whitespace in src/.Robin H. Johnson2011-01-17
|
* 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)
* Avoid race condition in runscript (bug #319865)Thomas Pfaff2010-12-03
| | | | | | | | | | | | | | | | 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.
* restore init.d pause optionMike Frysinger2010-04-09
|
* Fix two leaks.Roy Marples2010-03-17
|
* random spelling fixesMike Frysinger2010-01-08
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Allow init scripts to show their dependencies easierRoy Marples2009-09-04
|
* We should use -feature instead of nofeature.Roy Marples2009-07-01
| | | | | | This matches the ifconfig and Gentoo USE flag syntax and is hopefully easier to read. Fixes #178.
* Warn about going inactive correctly.Roy Marples2009-06-01
|
* 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.
* If already started or stopped, abort.Roy Marples2009-05-17
|
* Fix compile on NetBSD and FreeBSDRoy Marples2009-05-05
|
* Add (c) to CopyrightRoy Marples2009-05-01
|
* Add -Z, --dry-run option to show which services we would start/stopRoy Marples2009-04-30
| | | | | without actually doing so. Fixes #151.
* Avoid more gcc warning about not checking return values ...Roy Marples2009-04-30
|
* Fix parensJuan RP2009-04-30
|
* Don't start services when their need dependency is brokenRoy Marples2009-04-28
|
* Cast to intRoy Marples2009-04-24
|
* Describe interval unitsRoy Marples2009-04-24
|
* Improve style for KNFRoy Marples2009-04-23
|
* Improve the service timeout code and reduce the timeout to 60 seconds.Roy Marples2009-04-23
| | | | | | Don't process any dependencies when changing runlevels and called outside of RC otherwise we can deadlock.
* Don't leak the lock fd.Roy Marples2009-04-18
|
* Fix compile on FreeBSD.Roy Marples2009-04-18
|
* Move status to runscript.sh so init scripts can override it, #159Roy Marples2009-04-18
| | | | | Return 32 if crashed, #163
* Using fifos for locking can be error prone.Roy Marples2009-04-17
| | | | | | | flocks are safer, as we only use tmpfs for our lock files. I don't know how this works for inactive just yet though ...
* yes should be YESRoy Marples2009-01-13
|
* We now warn about clock skewsRoy Marples2009-01-12
| | | | | | 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
* Our error messages don't have full stops at the endRoy Marples2008-12-23
|
* Typo.Roy Marples2008-12-23
|
* Disallow hotplug to run during sysinit, but allow elsewhere. Fixes #131.Roy Marples2008-12-23
|