aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
AgeCommit message (Collapse)AuthorFiles
2011-07-10rc.sysinit: Remove unneeded variables initializationsKurt J. Bosch1
Variables should be empty anyway here.
2011-07-10functions/rc.sysinit: Refactor fsck-redirection to prevent breakageKurt J. Bosch1
$FSCK_OUT/$FSCK_ERR might not be set when: * unset in some custom sysinit_prefsck hook * calling fsck() from a shutdown hook
2011-07-10rc.sysinit: Declare $FORCEFSCK read-onlyKurt J. Bosch1
This prevents sysinit_prefsck hooks from overwriting the value.
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-10rc.sysinit: Fix stat_busy block indentationKurt J. Bosch1
The general rule is now: Align stat_{fail,done} with stat_busy
2011-06-28rc.sysinit: Add status output for mtab and dmesg.log creationKurt J. Bosch1
2011-06-28rc.sysinit: Refactor /etc/mtab symlink detection to avoid empty if clauseKurt J. Bosch1
2011-06-28Move export PATH into functionsKurt J. Bosch1
Also sanitze the PATH for rc.single, rc.multi, rc.local and daemons.
2011-06-28Move activate_vgs and crypt stat_busy to the top for consistencyKurt J. Bosch1
2011-06-28Move fsck executable check into fsck_all() for consistencyKurt J. Bosch1
2011-06-28rc.sysinit: Get rid of evalKurt J. Bosch1
2011-06-28Refactor to get rid of simple if-constuctsKurt J. Bosch1
2011-06-28Add some commentsKurt J. Bosch1
2011-06-28Fix local statements missing in ck_depends, ck_pidfile, do_unlock, ↵Kurt J. Bosch1
kill_everything
2011-06-28Fix '>|' not used allways when redirecting to filesKurt J. Bosch1
This avoids errors if one should set the noclobber shell option somewhere (within a daemon script or some custom function). We already had this, but it seems gone lost mostly.
2011-06-28rc.sysinit: Fix setting localeKurt J. Bosch1
When using process substitution with status(), the resulting /dev/fd/* might get lost before it is actualy used. This happens in case a custom stat_busy() forks a subshell.
2011-06-28rc.sysinit: Fix writing to /dev/urandomKurt J. Bosch1
Note: The code status "$text" $command > $file writes nothing because there's a &>/dev/null within status().
2011-06-28Fix whitespaceKurt J. Bosch1
2011-06-25hwclock: show statusTom Gundersen1
Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-25hwclock: use correct timezoneTom Gundersen1
To avoid setting the kernel timezone with an out-of-date /etc/localtime, we pass TZ directly to hwclock. Also document how TIMEZONE and HARDWARECLOCK are optional in rc.conf Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-25trivial: silence errorsTom Gundersen1
This is a cleanup of a commit 171da3d. We get errors because /tmp/. and /tmp/.. cannot be deleted on boot. Send them to /dev/null. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-24Simplify /etc/profile.d/locale.sh creationKurt J. Bosch1
2011-06-24Get rid of simple if-constucts by using '&&'Kurt 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-24Some more cosmeticsKurt J. Bosch1
2011-06-24Some cosmeticsKurt J. Bosch1
2011-06-24Simplify API filesystems mountingKurt J. Bosch1
2011-06-24Simplify keyboard map loading by using loadkeys autodetectionKurt J. Bosch1
2011-06-24Simplify creating files by using /bin/installKurt J. Bosch1
2011-06-24Simplify timezone copyingKurt J. Bosch1
Error/stat_fail when $TIMEZONE is invalid instead of skipping silently.
2011-06-24Fix hwclock commentsKurt J. Bosch1
2011-06-22Move mount -a into functions to allow custom override (fsck on loop)Kurt J. Bosch1
2011-06-22Allow custom fsck on shutdown via hook (FS#18736)Kurt J. Bosch1
2011-06-22Move fsck stuff into functions to allow custom overrides (FS#18736)Kurt J. Bosch1
2011-06-20status: adjust number of columns after loading modulesTom Gundersen1
In case loading modules enables a frambuffer with higher resolution than the standard 80 columns, we recalculate the number of columns after all modules have been loaded. Original-patch-by: Aaron Griffin <aaronmgriffin@gmail.com> Original-patch-by: Søren Poulsen <nikorpoulsen@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-19Adding hook sysinit_postmountjofko1
In some cases is good to know when rc.sysinit is going to use /usr See FS#24712 Signed-off-by: jofko <joffko@gmail.com> [tomegun: added comment to 'functions' and changed name of hook] Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-19rc.sysinit: avoid use of regex match for USE* varsDave Reisner1
Although silly, this would positively match something such as USRBTRFS=deadeyes Instead, enumerate the match as a simple glob. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-14rc.sysinit: honor blacklist, not load_modulesDave Reisner1
This is some unfinished business from our removal of load-modules.sh. We call modprobe with -ab for the contents of the MODULES array, which should no longer contain ! prefixed module names. --quiet is explicitly ommitted, as users should be aware of any errors that might occur here. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-10hostname: echo to kernel directlyTom Gundersen1
This allows us to ignore the hostname utility, whose home is currently in flux. Suggested-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-06Merge remote-tracking branch 'djgera/djgera'Tom Gundersen1
Conflicts: rc.single rc.sysinit Mostly trivial conflicts with Dave's path purging Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-06udev: remove rule generationTom Gundersen1
This has been removed from the udev package, so this code would never be executed. Can finally be removed. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-05hwclock: allow TZ to be set in adjtime, only adjust for TZ during bootTom Gundersen1
This allows HARDWARECLOCK to be removed from rc.conf, if you want to rely on /var/lib/hwclock/adjtime (or wherever the file ends up in the future). It assumes the relevant path is on the rootfs. Furthermore, we can assume (since kernel2.6.??) that the rtc modules set the time from rtc themselves, so our job is just to adjust the tz. (FWIW, this coincides with what systemd does). To get the old behavior of not touching the rtc, set it to anything anything else. We should probably have chosen a syntax for this, like IGNORE. Maybe another time... Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-04Be consistent (with mkinitcpio) source naming of /runGerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-04[initscripts] chmod dmesg.log based on value from dmesg_restrictGerardo Exequiel Pozzi1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-05udev: don't silence settle + trivialTom Gundersen1
If settle finishes too early, we want to know as some needed devices might not yet have been enumerated. Do not pass --quiet. Do not check for running udev before doing trigger/settle. Worst case, if someone does not have udev (which is not supported), they will see some extra status lines, but boot will still continue. Lastly, remove obvious comments (they were repeating the status message in the line below). 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-05Merge remote-tracking branch 'falconindy/working'Tom Gundersen1
Conflicts: rc.sysinit Conflict with ip move away from /usr
2011-06-05loopback: support separate /usr2011.06.3Tom Gundersen1
The move to iproute2 broke the setup of loopback for users having a separate /usr, as it was not monuted before /usr/bin/ip was called. Together with iprouet2-2.6.38-3, this fixes the problem by using /sbin/ip instead. Signed-off-by: Tom Gundersen <teg@jklm.no>
2011-06-04use $() instead of `` for command substitutionsDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-04rc.d/rc.sysinit: whitespace cleanupDave Reisner1
Signed-off-by: Dave Reisner <d@falconindy.com>