mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
- cleanup of activate_vg() in lvm boot script - use less of busybox utilities - conf.d for BUSYBOX=y usage for the packages - don't poke on conffile for RESUME - use printf instead of expr (ooh ash and dash are *fun*) - fix update-initramfs to use current_version when no other version exists around
62 lines
1.6 KiB
Bash
62 lines
1.6 KiB
Bash
# Local filesystem mounting -*- shell-script -*-
|
|
|
|
# Parameter: Where to mount the filesystem
|
|
mountroot ()
|
|
{
|
|
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top"
|
|
run_scripts /scripts/local-top
|
|
[ "$quiet" != "y" ] && log_end_msg
|
|
|
|
# If the root device hasn't shown up yet, give it a little while
|
|
# to deal with removable devices
|
|
if [ ! -e "${ROOT}" ]; then
|
|
log_begin_msg "Waiting for root file system..."
|
|
if [ -x /sbin/usplash_write ]; then
|
|
/sbin/usplash_write "TIMEOUT 180" || true
|
|
fi
|
|
|
|
slumber=1800
|
|
while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do
|
|
/bin/sleep 0.1
|
|
slumber=$(( ${slumber} - 1 ))
|
|
done
|
|
|
|
if [ ${slumber} -gt 0 ]; then
|
|
log_end_msg 0
|
|
else
|
|
log_end_msg 1 || true
|
|
fi
|
|
if [ -x /sbin/usplash_write ]; then
|
|
/sbin/usplash_write "TIMEOUT 15" || true
|
|
fi
|
|
fi
|
|
|
|
# We've given up, but we'll let the user fix matters if they can
|
|
while [ ! -e "${ROOT}" ]; do
|
|
panic "ALERT! ${ROOT} does not exist. Dropping to a shell!"
|
|
done
|
|
|
|
eval $(fstype < ${ROOT})
|
|
|
|
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount"
|
|
run_scripts /scripts/local-premount
|
|
[ "$quiet" != "y" ] && log_end_msg
|
|
|
|
if [ ${readonly} = y ]; then
|
|
roflag=-r
|
|
else
|
|
roflag=-w
|
|
fi
|
|
|
|
# FIXME This has no error checking
|
|
modprobe -q ${FSTYPE}
|
|
|
|
# FIXME This has no error checking
|
|
# Mount root
|
|
mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
|
|
|
|
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom"
|
|
run_scripts /scripts/local-bottom
|
|
[ "$quiet" != "y" ] && log_end_msg
|
|
}
|