summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions52
1 files changed, 22 insertions, 30 deletions
diff --git a/functions b/functions
index 7fa4ebe..f03cccb 100644
--- a/functions
+++ b/functions
@@ -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