aboutsummaryrefslogtreecommitdiff
path: root/rc.single
AgeCommit message (Collapse)AuthorFiles
2012-07-12Correct spelling and grammar throughoutJason St. John1
This patch addresses the issues with my previous patch submission here: https://mailman.archlinux.org/pipermail/arch-projects/2012-June/002990.html The notable changes between this patch and the previous one are below: -- this patch does not rename set_timezone() -- 'filesystems' and 'bash' are left as-is -- everything is in one patch, not two -- the 'makedepends' change is no longer relevant because the duplication of it was already removed in a later commit Regarding the capitalization of "Btrfs", it seems that upstream prefers "Btrfs".[1][2] Regarding 'https://' vs. 'http://', I left this change in the patch because stating 'https://www.archlinux.org' in the start-up messages doesn't force anyone to use HTTPS over HTTP. It simply shows that HTTPS is available for use. If someone really doesn't want to use HTTPS, they don't have to. Finally, Dan McGee stated that HTTPS will be used all the time soon.[3] [1] https://oss.oracle.com/projects/btrfs/ [2] https://btrfs.wiki.kernel.org/index.php/Main_Page [3] https://bugs.archlinux.org/task/30486#comment96222 Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2011-11-13minilogd: last kill!2011.11.3Gerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-12rc.single: Call remove_leftover() when going single-userKurt J. Bosch1
This avoids trouble because of stale /run/daemons/* files.
2011-07-10rc.single: Remove $PATH assignmentKurt J. Bosch1
No need to set $PATH any more now that is in functions
2011-07-10Refactor kill_everything, fsck_all and mount_all codeKurt J. Bosch1
Genaral scheme for hook positions is now: run_hook pre_foo if [[$WE_WANT_TO_DO_FOO]]]; then stat_busy "Doing foo" if [[$PRECONDITIONS_FOR_FOO_NOT_SATISFIED]]; then stat_fail else ... stat_done fi fi run hook post_foo rc.sysinit ----------- run_hook pre_foo [[$WE_WANT_TO_DO_FOO]] && status "Doing foo" foo run hook post_foo functions ------------ foo() { [[$PRECONDITIONS_FOR_FOO_NOT_SATISFIED]] && return 1 ... } Rationale Following this scheme as close as possible (without duplicating code and status messages) makes stuff more readable and uniform. Splitting kill_everything() into two new functions stop_all_daemons() and kill_all() also allows customization of either daemons stopping or process killing in an easy way. Suggested-by: Tom Gundersen <teg@jklm.no>
2011-07-02functions/rc.single: Clean up whitespaceKurt J. Bosch1
2011-06-24rc.multi/rc.single: Merge duplicated bootlogd stop code into a functionKurt J. Bosch1
2011-06-24rc.sysinit/rc.single: Merge UDev stuff into a functionKurt J. Bosch1
rc.single changes (when coming from multi-user): * avoid settling UDev quietly as in rc.sysinit * modules defined in rc.conf are loaded if missing * minilogd is started before udevd as in rc.sysinit rc.sysinit behaviour is unchanged
2011-06-24Fix bootlogd not stopped when booting into runlevel '1'Kurt J. Bosch1
2011-06-24rc.single: Avoid rc.multi syslog start error - use minilogd as in rc.sysinitKurt J. Bosch1
2011-06-24Simplify rc.single udevadm stuff as in rc.sysinitKurt J. Bosch1
2011-06-08Clean up ANSI codes from /var/log/bootEric Bélanger1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-05add PATH, strip absolute path from binariesDave Reisner1
Since we're declaring a PATH anyways, we may as well use it. This gives us immunity against binaries moving around, as in the recent case of iproute2. A few other minor, associated, tweaks to go along with this: * any -x tests are modified to use 'type -P' to resolve the path before checking for execute permission * any pidof checks are stripped of paths as well.
2011-06-04use $() instead of `` for command substitutionsDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-05-08Change stat_busy()/stat_done() -> status()Gerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30workaround: do not set property=STARTUP=1 when calling udevadmGerardo Exequiel Pozzi1
Apply same logic like in rc.sysinit (commit c3063d0400e7a55c9dbd6ff1b76887744e9b6224) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-30Change udev trigger orderGerardo Exequiel Pozzi1
Respect the order documented at udev README and systemd files. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-04-23bootlogd: log messages to console during early bootTom Gundersen1
This saves all the output during boot to /var/log/boot, which makes debugging boot problems much simpler. The logfile contains all the control (color) characters from boot, so some post processing is in order before the log can be read in a nice format (e.g. less should be able to show this nicely in raw mode). Start bootlogd as soon as the required /dev/pts is mounted. When boot is finished (either at the end of rc.multi or rc.single) create the required lof file (/var/log/boot) if it does not exist. This causes bootlogd to flush the log to disk. Finally, send SIGTERM to bootlogd and clean up after it. Idea-and-original-patch-by: Søren Poulsen <nikorpoulsen@gmail.com> Tested-by: David Goldstein <djg1971@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-03-29use bash's kill builtin instead of /bin/killDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-03-29whitespace cleanupDave Reisner1
* adhere to a consistant vim modeline * use top-right/bottom-left braces for functions Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2010-12-06udevadm: trigger events of type subsystems as well as devicesTom Gundersen1
The standard type to trigger is devices. This patch makes the type explicit and also triggers events of type subsystems. This is what is done upstream (in udev's systemd service files).
2010-07-11Both rc.single and rc.shutdown use the same code to kill everything.Victor Lowther1
Simplify it, and move that shared code into functions. Parsing the output of ls is Bad, especially when globbing works just as well and does not get confused by odd characters in filenames. bash has arithemetic for loops. Use them instead of while loops for iterating over arrays.
2010-07-11Bashify rc.single.Victor Lowther1
2010-06-03Add --action=add to udevadm trigger2010.06-1Thomas Bächler1
This is necessary as the new udev defaults to --action=change which breaks network device renaming.
2010-02-15Always shutdown daemons, regardless of runlevel in rc.single tooKurt J. Bosch1
2010-01-26Move single_prekillall hook after the stat_busy message (as per request by ↵Thomas Bächler1
Kurt Bosch)
2009-11-06Correct last commit: Unset the STARTUP=1 variable in udevadm control only ↵Thomas Bächler1
after udev has settled
2009-11-05Set STARTUP=1 environment variable on initial udev triggering, required by ↵Thomas Bächler1
latest device-mapper rules
2009-08-26Make the hook-system a bit more usableThomas Bächler1
This patch makes the hook names unique, prefixing them all with the script name (without the 'rc.') It also removes the explicit declarations of all elements of the array, bash assumes "" if they are uninitialized
2009-08-25Implement a hook-system that allows to add custom code to the initscripts at ↵Thomas Bächler1
certain places A function add_hook can be called from functions.d to register a hook function. The existing hooks are based on suggestions from Michael Towers (larch) and on the implementation of initscripts-extras-fbsplash which currently uses the strings passed to stat_busy and stat_done for this. More hooks can be added if requested. The implementation uses associative arrays and will thus only work with bash 4 or later
2009-08-24Remove support for static filesystem and make code in rc.single look like ↵Thomas Bächler1
the code in rc.sysinit/rc.shutdown udev has been a dependency of initscripts for a long time, the system won't work without it anyway. Thus remove the "Using static filesystem" message which does nothing anyway and always try to start udevd At the same time, update the killall5 and udev start code in rc.single
2009-08-03Fix array syntax for DAEMONS loopAaron Griffin1
Whoops! Noticed-by: Florian Pritz <f-p@gmx.at> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-30Shutdown non-rc.conf daemons first at rc.singleGerardo Exequiel Pozzi1
To match with commit 7f1bd75ee6aaffddf47e704c46fbab5396b7dd19 for rc.shutdown. Flip the order in which daemons are shutdown. First we scan for all daemons that are NOT in rc.conf and shut those down (order is based on ls, so it is dependent on LC_COLLATE). Afterwards, we shut down all daemons in rc.conf, in order. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-07Fix array count/walk in rc.shutdown and rc.single, see #13263Thomas Bächler1
2009-06-07We always mount /sys, thus remove a superfluous check for /sys/block. Also ↵Thomas Bächler1
fixes #14437
2009-06-07Make the daemon shutdown in rc.single consistent with rc.shutdown, see #12978Thomas Bächler1
2008-09-18Respawn udev properly when running 'init s'. Fixes #97392008.09-1Thomas Bächler1
2008-05-22Remove source_functions in favor of always sourcing the dirAaron Griffin1
This is an obvious oversight on my part - this change allows the overridden functions to work in daemon scripts and anything else that uses /etc/rc.d/functions by itself. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-03-09More full-path fixesRoman Kyrylych1
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
2008-03-08Use full path to binaries everywhereRoman Kyrylych1
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
2007-11-28Source /etc/rc.d/functions.d/ for additional initscript functionsAaron Griffin1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-18'upgpkg: trying to fix #6237,7554,7165,7641,5740'Tobias Powalowski1
2006-12-16rc.sysinit, rc.shutdown:Thomas Bächler1
- Code cleanup - Added "verbose" commandline option for debugging - Fixed #5968 - Fixed #4648
2006-06-07'upgpkg: removed the rest of 2.4 kernel'Tobias Powalowski1
2006-03-27fix for #4296Judd Vinet1
2005-09-15modified netcfg/network scripts -- you can list multiple entries in ↵Judd Vinet1
NET_PROFILES that use the same INTERFACE. They will be started one at a time, and the first successful one will be kept.
2005-06-30added new netcfg stuff for roaming network profilesJudd Vinet1
2005-03-11added support for backgrounding daemons at startup with a '@' prefix, ↵Judd Vinet1
commented out the ldconfig call at startup, added support for unicode console maps, added a hotplug_ifup() function rc.d/network for hotplug's net.agent to use
2005-01-02fixed a typo in the rc.conf comments0.7Judd Vinet1
2004-11-30fixed the missing /dev/initctl problem with udev in runlevel 1Judd Vinet1