diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-06-01 12:57:32 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-06-01 12:57:32 -0300 |
commit | a8a948b7ae57f660f61ce44251f938d9317c113b (patch) | |
tree | 519d9eb03bc0352e6a084c336f63bcc7ae00e794 /functions | |
parent | 10c7127d5ff693a8f0c9671b9d3253315f2095be (diff) | |
parent | a20ce0e666b5c97080a880eee9d8301c3d48b177 (diff) |
Merge branch 'master' of git://projects.archlinux.org/initscripts2012.06.1
Conflicts:
hostname.5.txt
locale.conf.5.txt
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 52 |
1 files changed, 22 insertions, 30 deletions
@@ -344,11 +344,25 @@ kill_all() { fi } +load_modules() { + local rc=0 + + /usr/lib/systemd/systemd-modules-load + rc=$? + + if (( ${#MODULES[*]} )); then + modprobe -ab "${MODULES[@]}" + (( rc += $? )) + fi + + return $rc +} + # Start/trigger UDev, load MODULES and settle UDev udevd_modprobe() { # $1 = where we are being called from. # This is used to determine which hooks to run. - status "Starting UDev Daemon" /usr/lib/udev/udevd --daemon + status "Starting UDev Daemon" /usr/lib/systemd/systemd-udevd --daemon run_hook "$1_udevlaunched" @@ -357,9 +371,8 @@ udevd_modprobe() { udevadm trigger --action=add --type=devices stat_done - # Load modules from the MODULES array defined in rc.conf - (( ${#MODULES[*]} )) && - status -v "Loading User-specified Modules" modprobe -ab "${MODULES[@]}" + # Load modules from the MODULES array and modules-load.d + status -v "Loading User-specified Modules" load_modules status "Waiting for UDev uevents to be processed" \ udevadm settle @@ -494,13 +507,11 @@ NETFS="nfs,nfs4,smbfs,cifs,codafs,ncpfs,shfs,fuse,fuseblk,glusterfs,davfs,fuse.g # Check local filesystems fsck_all() { - [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-f" - - if [[ ! -n $FORCEFSCK ]] && { [[ -f /fastboot ]] || in_array fastboot $(< /proc/cmdline); }; then + if [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline); then + FORCEFSCK="-f" + elif [[ -f /fastboot ]] || in_array fastboot $(< /proc/cmdline); then return 0 - fi - - if [[ -e /run/initramfs/root-fsck ]]; then + elif [[ -e /run/initramfs/root-fsck ]]; then IGNORE_MOUNTED="-M" fi @@ -578,8 +589,7 @@ umount_all() { } remove_leftover() { - stat_busy "Removing Leftover Files" - /usr/lib/initscripts/arch-tmpfiles --create --remove && stat_done || stat_fail + status -v 'Removing Leftover Files' systemd-tmpfiles --create --remove # move from static /var/{run,lock} to /run if [[ ! -L /var/lock ]]; then rm -rf /var/lock @@ -658,24 +668,6 @@ if (( RC_FUNCTIONS_HOOK_FUNCS_DEFINED != 1 )); then declare -r RC_FUNCTIONS_HOOK_FUNCS_DEFINED=1 fi -# Function for setting console font if required -set_consolefont() { - [[ $CONSOLEFONT ]] || return 0 - stat_busy "Loading Console Font: $CONSOLEFONT" - #CONSOLEMAP in UTF-8 shouldn't be used - [[ $CONSOLEMAP && ${LOCALE,,} =~ utf ]] && CONSOLEMAP="" - local i - for i in /dev/tty[0-9]*; do - setfont ${CONSOLEMAP:+-m "${CONSOLEMAP}"} \ - "$CONSOLEFONT" -C ${i} &>/dev/null - done - if (( $? )); then - stat_fail - else - stat_done - fi -} - if [[ $DAEMON_LOCALE = [yY][eE][sS] ]]; then export LANG=${LOCALE:-C} if [[ -r /etc/locale.conf ]]; then |