summaryrefslogtreecommitdiff
path: root/rc.d
AgeCommit message (Collapse)Author
2012-06-23rc.d: remove bad examplesSébastien Luttringer
rc.d must have explicit daemon name with command other than list Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
2012-03-13Remove NEED_ROOT crapSébastien Luttringer
This patch revert patch 042d197b4d989ec64. NEED_ROOT was introduced to fix bug FS#24095. But in fact it doesn't solve it because nobody use it. The idea was to allow initscripts developper to have a check runned by every scripts which tell if scripts need to be run as root (most of them) or not (and the script check itself which part of him have to be run as root). All this to display a cute error message. I think this complexity is superfluous and let part of initscript will fail if rights are not enough. I must confess that we should have marked this bug as wontfix rather than do that. Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
2012-02-03Small style cleanupLukas Fleischer
* Add whitespace to arithmetic expressions. * Use boolean logic for semantically boolean variables. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-11-06Fix misspelt error messageJelle van der Waa
FS#26726 error message should say 'Daemon' instead of 'Dameon' [tomegun: fixed commit message] Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2011-08-27rc.d: handle a set of optionsSebastien Luttringer
rc.d can now take --started, --stopped, --auto, --noauto as option which help user to filter list of daemon for all actions As a corollary list command can now take a list of dameon to display All kind of arguments can be mixed to obtain the proper output. zsh and bash completion are updated Note: Output of help command exit 0 and is no more printed on stderr Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-27New smarter display of bad daemon names in rc.dSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-08-19rc.d: clarify error when [[ -x /etc/rc.d/$i ]] failsDave Reisner
A script marked a-x will be reported as missing, when in fact it's only non-executable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-27rc.d: clear text formatting after errorJacob Okamoto
Patch to fix FS#24879, clearing terminal text formatting after nonexistent daemon script failure in rc.d. Signed-off-by: Jacob Okamoto <jacobokamoto@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-18Ensure rc.d scripts are run as rootSebastien Luttringer
By default all script should be run as root. If NEED_ROOT=0 is set before loading /etc/rc.d/functions in a rc.d scripts, this will not apply. This allow script with only some part which require root level to call need_root() function at beginning of those parts. Close FS#24095 Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-18rc.d: Add started/stopped option to listSebastien Luttringer
This patch allow rc.d list started and rc.d list stopped which list respectively only started and stopped daemons Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-18rc.d: Update usageSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-06-05remove absolute paths from daemons and rc.dDave Reisner
These are run from a context where PATH will be set, so defining absolute paths is unnecessary.
2011-06-04rc.d/rc.sysinit: whitespace cleanupDave Reisner
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-01Merge branch 'snowman'Tom Gundersen
Conflicts: rc.d Trivial conflict with dave's eval purge. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-01rc.d: Add error message when daemon script is not foundEric Bélanger
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-31rc.d: print usage if not enough argumentSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-31rc.d: Remove cd from the loopSebastien Luttringer
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-31rc.d: declare ENV as an arrayDave Reisner
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-21Add TERM var to rc.d cleaned envSebastien Luttringer
We need to do this to allow a correct detection of terminal colors in functions sourced by rc.d scripts Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-21Add syntax to vim modeline in rc.d scriptSebastien Luttringer
With new name of script, vim doesn't reconize correctly file format. We need to set it explicitly. Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
2011-05-12Improve rc printingSebastien Luttringer
- print daemon text with C_CLEAR and not C_MAIN - print rc name based on $0 (in case of renaming) Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-05-11Rename rc into rc.d2011.05.1Sebastien Luttringer
To avoid conflict with plan9 rc shell we need to rename our rc. Original name come from debian invoke-rc.d, shortened into rc. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>