Age | Commit message (Collapse) | Author |
|
This avoids trouble because of stale /run/daemons/* files.
|
|
No need to set $PATH any more now that is in functions
|
|
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>
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
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.
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
* 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>
|
|
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).
|
|
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.
|
|
|
|
This is necessary as the new udev defaults to --action=change which
breaks network device renaming.
|
|
|
|
Kurt Bosch)
|
|
after udev has settled
|
|
latest device-mapper rules
|
|
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
|
|
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
|
|
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
|
|
Whoops!
Noticed-by: Florian Pritz <f-p@gmx.at>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
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>
|
|
|
|
fixes #14437
|
|
|
|
|
|
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>
|
|
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
|
|
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
|
|
- Code cleanup
- Added "verbose" commandline option for debugging
- Fixed #5968
- Fixed #4648
|
|
|
|
|
|
NET_PROFILES that use the same INTERFACE. They will be started one at a time, and the first successful one will be kept.
|
|
|
|
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
|
|
|
|
|
|
|
|
|