deprecate old command line options
parent
e88e3b2797
commit
68e7661ca7
|
@ -19,10 +19,10 @@ inst_key_val() {
|
||||||
unset _value
|
unset _value
|
||||||
}
|
}
|
||||||
|
|
||||||
inst_key_val '' /etc/vconsole.conf KEYMAP vconsole.keymap KEYTABLE
|
inst_key_val '' /etc/vconsole.conf KEYMAP vconsole.keymap -d KEYTABLE
|
||||||
inst_key_val '' /etc/vconsole.conf FONT vconsole.font SYSFONT
|
inst_key_val '' /etc/vconsole.conf FONT vconsole.font -d SYSFONT
|
||||||
inst_key_val '' /etc/vconsole.conf FONT_MAP vconsole.font.map CONTRANS
|
inst_key_val '' /etc/vconsole.conf FONT_MAP vconsole.font.map -d CONTRANS
|
||||||
inst_key_val '' /etc/vconsole.conf FONT_UNIMAP vconsole.font.unimap UNIMAP
|
inst_key_val '' /etc/vconsole.conf FONT_UNIMAP vconsole.font.unimap -d UNIMAP
|
||||||
inst_key_val 1 /etc/vconsole.conf UNICODE vconsole.unicode vconsole.font.unicode
|
inst_key_val 1 /etc/vconsole.conf UNICODE vconsole.unicode vconsole.font.unicode
|
||||||
inst_key_val '' /etc/vconsole.conf EXT_KEYMAP vconsole.keymap.ext
|
inst_key_val '' /etc/vconsole.conf EXT_KEYMAP vconsole.keymap.ext
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
if getargbool 1 rd.splash -n rd_NO_SPLASH; then
|
if getargbool 1 rd.splash -d -n rd_NO_SPLASH; then
|
||||||
info "Starting Gentoo Splash"
|
info "Starting Gentoo Splash"
|
||||||
|
|
||||||
[ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0
|
[ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
if [ -x /bin/plymouthd ]; then
|
if [ -x /bin/plymouthd ]; then
|
||||||
if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
|
if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
|
||||||
# first trigger graphics subsystem
|
# first trigger graphics subsystem
|
||||||
udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
|
udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
|
||||||
# first trigger graphics and tty subsystem
|
# first trigger graphics and tty subsystem
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# close everything which is not busy
|
# close everything which is not busy
|
||||||
rm -f /etc/udev/rules.d/70-luks.rules >/dev/null 2>&1
|
rm -f /etc/udev/rules.d/70-luks.rules >/dev/null 2>&1
|
||||||
|
|
||||||
if ! getarg rd.luks.uuid rd_LUKS_UUID >/dev/null 2>&1 && getargbool 1 rd.luks -n rd_NO_LUKS >/dev/null 2>&1; then
|
if ! getarg rd.luks.uuid -d rd_LUKS_UUID >/dev/null 2>&1 && getargbool 1 rd.luks -d -n rd_NO_LUKS >/dev/null 2>&1; then
|
||||||
while true; do
|
while true; do
|
||||||
local do_break="y"
|
local do_break="y"
|
||||||
for i in /dev/mapper/luks-*; do
|
for i in /dev/mapper/luks-*; do
|
||||||
|
|
|
@ -36,7 +36,7 @@ fi
|
||||||
numtries=${3:-10}
|
numtries=${3:-10}
|
||||||
|
|
||||||
# TODO: improve to support what cmdline does
|
# TODO: improve to support what cmdline does
|
||||||
if [ -f /etc/crypttab ] && getargbool 1 rd.luks.crypttab -n rd_NO_CRYPTTAB; then
|
if [ -f /etc/crypttab ] && getargbool 1 rd.luks.crypttab -d -n rd_NO_CRYPTTAB; then
|
||||||
while read name dev luksfile luksoptions; do
|
while read name dev luksfile luksoptions; do
|
||||||
# ignore blank lines and comments
|
# ignore blank lines and comments
|
||||||
if [ -z "$name" -o "${name#\#}" != "$name" ]; then
|
if [ -z "$name" -o "${name#\#}" != "$name" ]; then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
if ! getargbool 1 rd.luks -n rd_NO_LUKS; then
|
if ! getargbool 1 rd.luks -d -n rd_NO_LUKS; then
|
||||||
info "rd.luks=0: removing cryptoluks activation"
|
info "rd.luks=0: removing cryptoluks activation"
|
||||||
rm -f /etc/udev/rules.d/70-luks.rules
|
rm -f /etc/udev/rules.d/70-luks.rules
|
||||||
else
|
else
|
||||||
|
@ -10,7 +10,7 @@ else
|
||||||
echo 'ACTION!="add|change", GOTO="luks_end"'
|
echo 'ACTION!="add|change", GOTO="luks_end"'
|
||||||
} > /etc/udev/rules.d/70-luks.rules.new
|
} > /etc/udev/rules.d/70-luks.rules.new
|
||||||
|
|
||||||
LUKS=$(getargs rd.luks.uuid rd_LUKS_UUID)
|
LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
|
||||||
tout=$(getarg rd.luks.key.tout)
|
tout=$(getarg rd.luks.key.tout)
|
||||||
|
|
||||||
if [ -n "$LUKS" ]; then
|
if [ -n "$LUKS" ]; then
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
DM_RAIDS=$(getargs rd.dm.uuid rd_DM_UUID=)
|
DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=)
|
||||||
|
|
||||||
DM_CLEANUP="no"
|
DM_CLEANUP="no"
|
||||||
|
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
# nodmraid for anaconda / rc.sysinit compatibility
|
# nodmraid for anaconda / rc.sysinit compatibility
|
||||||
if ! getargbool 1 rd.dm -n rd_NO_DM || getarg nodmraid; then
|
if ! getargbool 1 rd.dm -d -n rd_NO_DM || getarg "rd.dm=0" -d nodmraid; then
|
||||||
info "rd.dm=0: removing DM RAID activation"
|
info "rd.dm=0: removing DM RAID activation"
|
||||||
udevproperty rd_NO_DM=1
|
udevproperty rd_NO_DM=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v mdadm >/dev/null || ! getargbool 1 rd.md.imsm -n rd_NO_MDIMSM || getarg noiswmd; then
|
if ! command -v mdadm >/dev/null || ! getargbool 1 rd.md.imsm -d -n rd_NO_MDIMSM -n noiswmd; then
|
||||||
info "rd.md.imsm=0: no MD RAID for imsm/isw raids"
|
info "rd.md.imsm=0: no MD RAID for imsm/isw raids"
|
||||||
udevproperty rd_NO_MDIMSM=1
|
udevproperty rd_NO_MDIMSM=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v mdadm >/dev/null || ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF || getarg noddfmd; then
|
if ! command -v mdadm >/dev/null || ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF -n noddfmd; then
|
||||||
info "rd.md.ddf=0: no MD RAID for SNIA ddf raids"
|
info "rd.md.ddf=0: no MD RAID for SNIA ddf raids"
|
||||||
udevproperty rd_NO_MDDDF=1
|
udevproperty rd_NO_MDDDF=1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,7 +6,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
if getargbool 0 rd.live.debug -y rdlivedebug; then
|
if getargbool 0 rd.live.debug -n -y rdlivedebug; then
|
||||||
exec > /tmp/liveroot.$$.out
|
exec > /tmp/liveroot.$$.out
|
||||||
exec 2>> /tmp/liveroot.$$.out
|
exec 2>> /tmp/liveroot.$$.out
|
||||||
set -x
|
set -x
|
||||||
|
@ -17,19 +17,19 @@ livedev="$1"
|
||||||
|
|
||||||
# parse various live image specific options that make sense to be
|
# parse various live image specific options that make sense to be
|
||||||
# specified as their own things
|
# specified as their own things
|
||||||
live_dir=$(getarg rd.live.dir live_dir)
|
live_dir=$(getarg rd.live.dir -d live_dir)
|
||||||
[ -z "$live_dir" ] && live_dir="LiveOS"
|
[ -z "$live_dir" ] && live_dir="LiveOS"
|
||||||
getargbool 0 rd.live.ram -y live_ram && live_ram="yes"
|
getargbool 0 rd.live.ram -d -y live_ram && live_ram="yes"
|
||||||
getargbool 0 rd.live.overlay.reset -y reset_overlay && reset_overlay="yes"
|
getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes"
|
||||||
getargbool 0 rd.live.overlay.readonly -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay=""
|
getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay=""
|
||||||
overlay=$(getarg rd.live.overlay overlay)
|
overlay=$(getarg rd.live.overlay -d overlay)
|
||||||
|
|
||||||
# CD/DVD media check
|
# CD/DVD media check
|
||||||
[ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev)
|
[ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev)
|
||||||
if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
|
if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
|
||||||
check="yes"
|
check="yes"
|
||||||
fi
|
fi
|
||||||
getarg rd.live.check check || check=""
|
getarg rd.live.check -d check || check=""
|
||||||
if [ -n "$check" ]; then
|
if [ -n "$check" ]; then
|
||||||
[ -x /bin/plymouth ] && /bin/plymouth --hide-splash
|
[ -x /bin/plymouth ] && /bin/plymouth --hide-splash
|
||||||
checkisomd5 --verbose $livedev
|
checkisomd5 --verbose $livedev
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
[ -z "$root" ] && root=$(getarg root=)
|
[ -z "$root" ] && root=$(getarg root=)
|
||||||
|
|
||||||
# support legacy syntax of passing liveimg and then just the base root
|
# support legacy syntax of passing liveimg and then just the base root
|
||||||
if getargbool 0 rd.live.image -y liveimg; then
|
if getargbool 0 rd.live.image -d -y liveimg; then
|
||||||
liveroot="live:$root"
|
liveroot="live:$root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
. /lib/dracut-lib.sh
|
. /lib/dracut-lib.sh
|
||||||
|
|
||||||
for modlist in $(getargs rd.driver.post rdinsmodpost=); do
|
for modlist in $(getargs rd.driver.post -d rdinsmodpost=); do
|
||||||
(
|
(
|
||||||
IFS=,
|
IFS=,
|
||||||
for m in $modlist; do
|
for m in $modlist; do
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
for i in $(getargs rd.driver.pre rdloaddriver=); do
|
for i in $(getargs rd.driver.pre -d rdloaddriver=); do
|
||||||
(
|
(
|
||||||
IFS=,
|
IFS=,
|
||||||
for p in $i; do
|
for p in $i; do
|
||||||
|
@ -11,7 +11,7 @@ for i in $(getargs rd.driver.pre rdloaddriver=); do
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in $(getargs rd.driver.blacklist rdblacklist=); do
|
for i in $(getargs rd.driver.blacklist -d rdblacklist=); do
|
||||||
(
|
(
|
||||||
IFS=,
|
IFS=,
|
||||||
for p in $i; do
|
for p in $i; do
|
||||||
|
@ -20,7 +20,7 @@ for i in $(getargs rd.driver.blacklist rdblacklist=); do
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
for p in $(getargs rd.driver.post rdinsmodpost=); do
|
for p in $(getargs rd.driver.post -d rdinsmodpost=); do
|
||||||
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
||||||
_do_insmodpost=1
|
_do_insmodpost=1
|
||||||
done
|
done
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
extraargs="$@"
|
extraargs="$@"
|
||||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
VGS=$(getargs rd.lvm.vg rd_LVM_VG=)
|
VGS=$(getargs rd.lvm.vg -d rd_LVM_VG=)
|
||||||
LVS=$(getargs rd.lvm.lv rd_LVM_LV=)
|
LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=)
|
||||||
SNAPSHOT=$(getargs rd.lvm.snapshot rd_LVM_SNAPSHOT=)
|
SNAPSHOT=$(getargs rd.lvm.snapshot -d rd_LVM_SNAPSHOT=)
|
||||||
SNAPSIZE=$(getargs rd.lvm.snapsize rd_LVM_SNAPSIZE=)
|
SNAPSIZE=$(getargs rd.lvm.snapsize -d rd_LVM_SNAPSIZE=)
|
||||||
|
|
||||||
[ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm
|
[ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm
|
||||||
# build a list of devices to scan
|
# build a list of devices to scan
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
if [ -e /etc/lvm/lvm.conf ] && ! getargbool 1 rd.lvm.conf -n rd_NO_LVMCONF; then
|
if [ -e /etc/lvm/lvm.conf ] && ! getargbool 1 rd.lvm.conf -d -n rd_NO_LVMCONF; then
|
||||||
rm -f /etc/lvm/lvm.conf
|
rm -f /etc/lvm/lvm.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! getargbool 1 rd.lvm -n rd_NO_LVM; then
|
if ! getargbool 1 rd.lvm -d -n rd_NO_LVM; then
|
||||||
info "rd.lvm=0: removing LVM activation"
|
info "rd.lvm=0: removing LVM activation"
|
||||||
rm -f /etc/udev/rules.d/64-lvm*.rules
|
rm -f /etc/udev/rules.d/64-lvm*.rules
|
||||||
else
|
else
|
||||||
for dev in $(getargs rd.lvm.vg rd_LVM_VG=) $(getargs rd.lvm.lv rd_LVM_LV=); do
|
for dev in $(getargs rd.lvm.vg -d rd_LVM_VG=) $(getargs rd.lvm.lv -d rd_LVM_LV=); do
|
||||||
wait_for_dev "/dev/$dev"
|
wait_for_dev "/dev/$dev"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
if ! getargbool 1 rd.md -n rd_NO_MD; then
|
if ! getargbool 1 rd.md -d -n rd_NO_MD; then
|
||||||
info "rd.md=0: removing MD RAID activation"
|
info "rd.md=0: removing MD RAID activation"
|
||||||
udevproperty rd_NO_MD=1
|
udevproperty rd_NO_MD=1
|
||||||
else
|
else
|
||||||
MD_UUID=$(getargs rd.md.uuid rd_MD_UUID=)
|
MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=)
|
||||||
|
|
||||||
# rewrite the md rules to only process the specified raid array
|
# rewrite the md rules to only process the specified raid array
|
||||||
if [ -n "$MD_UUID" ]; then
|
if [ -n "$MD_UUID" ]; then
|
||||||
|
@ -29,25 +29,25 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -e /etc/mdadm.conf ] && getargbool 1 rd.md.conf -n rd_NO_MDADMCONF; then
|
if [ -e /etc/mdadm.conf ] && getargbool 1 rd.md.conf -d -n rd_NO_MDADMCONF; then
|
||||||
udevproperty rd_MDADMCONF=1
|
udevproperty rd_MDADMCONF=1
|
||||||
rm -f $hookdir/pre-pivot/*mdraid-cleanup.sh
|
rm -f $hookdir/pre-pivot/*mdraid-cleanup.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! getargbool 1 rd.md.conf -n rd_NO_MDADMCONF; then
|
if ! getargbool 1 rd.md.conf -d -n rd_NO_MDADMCONF; then
|
||||||
rm -f /etc/mdadm/mdadm.conf /etc/mdadm.conf
|
rm -f /etc/mdadm/mdadm.conf /etc/mdadm.conf
|
||||||
ln -s $(command -v mdraid-cleanup) $hookdir/pre-pivot/31-mdraid-cleanup.sh 2>/dev/null
|
ln -s $(command -v mdraid-cleanup) $hookdir/pre-pivot/31-mdraid-cleanup.sh 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# noiswmd nodmraid for anaconda / rc.sysinit compatibility
|
# noiswmd nodmraid for anaconda / rc.sysinit compatibility
|
||||||
# note nodmraid really means nobiosraid, so we don't want MDIMSM then either
|
# note nodmraid really means nobiosraid, so we don't want MDIMSM then either
|
||||||
if ! getargbool 1 rd.md.imsm -n rd_NO_MDIMSM || getarg noiswmd || getarg nodmraid; then
|
if ! getargbool 1 rd.md.imsm -d -n rd_NO_MDIMSM -n noiswmd -n nodmraid; then
|
||||||
info "no MD RAID for imsm/isw raids"
|
info "no MD RAID for imsm/isw raids"
|
||||||
udevproperty rd_NO_MDIMSM=1
|
udevproperty rd_NO_MDIMSM=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# same thing with ddf containers
|
# same thing with ddf containers
|
||||||
if ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF || getarg noddfmd || getarg nodmraid; then
|
if ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF -n noddfmd -n nodmraid; then
|
||||||
info "no MD RAID for SNIA ddf raids"
|
info "no MD RAID for SNIA ddf raids"
|
||||||
udevproperty rd_NO_MDDDF=1
|
udevproperty rd_NO_MDDDF=1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
for dasd_arg in $(getargs rd.dasd= rd_DASD= DASD=); do
|
for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
|
||||||
(
|
(
|
||||||
IFS=","
|
IFS=","
|
||||||
set $dasd_arg
|
set $dasd_arg
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
mod_args=""
|
mod_args=""
|
||||||
|
|
||||||
for dasd_arg in $(getargs rd.dasd= rd_DASD= DASD=); do
|
for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
|
||||||
mod_args="$mod_args,$dasd_arg"
|
mod_args="$mod_args,$dasd_arg"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -40,14 +40,14 @@ modprobe crc32c 2>/dev/null
|
||||||
|
|
||||||
[ -e /sys/module/bnx2i ] && iscsiuio
|
[ -e /sys/module/bnx2i ] && iscsiuio
|
||||||
|
|
||||||
if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then
|
if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||||
if [ -z "$root" -o -n "${root%%block:*}" ]; then
|
if [ -z "$root" -o -n "${root%%block:*}" ]; then
|
||||||
# if root is not specified try to mount the whole iSCSI LUN
|
# if root is not specified try to mount the whole iSCSI LUN
|
||||||
printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
|
printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
|
||||||
udevadm control --reload
|
udevadm control --reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for p in $(getargs rd.iscsi.param iscsi_param); do
|
for p in $(getargs rd.iscsi.param -d iscsi_param); do
|
||||||
iscsi_param="$iscsi_param --param $p"
|
iscsi_param="$iscsi_param --param $p"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -66,25 +66,25 @@ handle_netroot()
|
||||||
local p
|
local p
|
||||||
|
|
||||||
# override conf settings by command line options
|
# override conf settings by command line options
|
||||||
arg=$(getargs rd.iscsi.initiator iscsi_initiator=)
|
arg=$(getargs rd.iscsi.initiator -d iscsi_initiator=)
|
||||||
[ -n "$arg" ] && iscsi_initiator=$arg
|
[ -n "$arg" ] && iscsi_initiator=$arg
|
||||||
arg=$(getargs rd.iscsi.target.name iscsi_target_name=)
|
arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=)
|
||||||
[ -n "$arg" ] && iscsi_target_name=$arg
|
[ -n "$arg" ] && iscsi_target_name=$arg
|
||||||
arg=$(getargs rd.iscsi.target.ip iscsi_target_ip)
|
arg=$(getargs rd.iscsi.target.ip -d iscsi_target_ip)
|
||||||
[ -n "$arg" ] && iscsi_target_ip=$arg
|
[ -n "$arg" ] && iscsi_target_ip=$arg
|
||||||
arg=$(getargs rd.iscsi.target.port iscsi_target_port=)
|
arg=$(getargs rd.iscsi.target.port -d iscsi_target_port=)
|
||||||
[ -n "$arg" ] && iscsi_target_port=$arg
|
[ -n "$arg" ] && iscsi_target_port=$arg
|
||||||
arg=$(getargs rd.iscsi.target.group iscsi_target_group=)
|
arg=$(getargs rd.iscsi.target.group -d iscsi_target_group=)
|
||||||
[ -n "$arg" ] && iscsi_target_group=$arg
|
[ -n "$arg" ] && iscsi_target_group=$arg
|
||||||
arg=$(getargs rd.iscsi.username iscsi_username=)
|
arg=$(getargs rd.iscsi.username -d iscsi_username=)
|
||||||
[ -n "$arg" ] && iscsi_username=$arg
|
[ -n "$arg" ] && iscsi_username=$arg
|
||||||
arg=$(getargs rd.iscsi.password iscsi_password)
|
arg=$(getargs rd.iscsi.password -d iscsi_password)
|
||||||
[ -n "$arg" ] && iscsi_password=$arg
|
[ -n "$arg" ] && iscsi_password=$arg
|
||||||
arg=$(getargs rd.iscsi.in.username iscsi_in_username=)
|
arg=$(getargs rd.iscsi.in.username -d iscsi_in_username=)
|
||||||
[ -n "$arg" ] && iscsi_in_username=$arg
|
[ -n "$arg" ] && iscsi_in_username=$arg
|
||||||
arg=$(getargs rd.iscsi.in.password iscsi_in_password=)
|
arg=$(getargs rd.iscsi.in.password -d iscsi_in_password=)
|
||||||
[ -n "$arg" ] && iscsi_in_password=$arg
|
[ -n "$arg" ] && iscsi_in_password=$arg
|
||||||
for p in $(getargs rd.iscsi.param iscsi_param); do
|
for p in $(getargs rd.iscsi.param -d iscsi_param); do
|
||||||
iscsi_param="$iscsi_param --param $p"
|
iscsi_param="$iscsi_param --param $p"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ esac
|
||||||
|
|
||||||
# Check required arguments
|
# Check required arguments
|
||||||
|
|
||||||
if nfsdomain=$(getarg rd.nfs.domain rd_NFS_DOMAIN); then
|
if nfsdomain=$(getarg rd.nfs.domain -d rd_NFS_DOMAIN); then
|
||||||
if [ -f /etc/idmapd.conf ]; then
|
if [ -f /etc/idmapd.conf ]; then
|
||||||
sed -i -e \
|
sed -i -e \
|
||||||
"s/^[[:space:]#]*Domain[[:space:]]*=.*/Domain = $nfsdomain/g" \
|
"s/^[[:space:]#]*Domain[[:space:]]*=.*/Domain = $nfsdomain/g" \
|
||||||
|
|
|
@ -76,7 +76,7 @@ mount_root() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rootopts=
|
rootopts=
|
||||||
if getargbool 1 rd.fstab -n rd_NO_FSTAB \
|
if getargbool 1 rd.fstab -d -n rd_NO_FSTAB \
|
||||||
&& ! getarg rootflags \
|
&& ! getarg rootflags \
|
||||||
&& [ -f "$NEWROOT/etc/fstab" ] \
|
&& [ -f "$NEWROOT/etc/fstab" ] \
|
||||||
&& ! [ -L "$NEWROOT/etc/fstab" ]; then
|
&& ! [ -L "$NEWROOT/etc/fstab" ]; then
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
getargbool 1 rd.zfcp.conf -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf
|
getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf
|
||||||
|
|
||||||
for zfcp_arg in $(getargs rd.zfcp 'rd_ZFCP='); do
|
for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
|
||||||
(
|
(
|
||||||
IFS=","
|
IFS=","
|
||||||
set $zfcp_arg
|
set $zfcp_arg
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
for ccw_arg in $(getargs rd.ccw 'rd_CCW=') $(getargs rd.znet 'rd_ZNET='); do
|
for ccw_arg in $(getargs rd.ccw -d 'rd_CCW=') $(getargs rd.znet -d 'rd_ZNET='); do
|
||||||
echo $ccw_arg >> /etc/ccw.conf
|
echo $ccw_arg >> /etc/ccw.conf
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
# Don't auto detect syslog but set it
|
# Don't auto detect syslog but set it
|
||||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
syslogserver=$(getarg syslog.server syslog)
|
syslogserver=$(getarg syslog.server -d syslog)
|
||||||
syslogfilters=$(getargs syslog.filter filter)
|
syslogfilters=$(getargs syslog.filter -d filter)
|
||||||
syslogtype=$(getarg syslog.type syslogtype)
|
syslogtype=$(getarg syslog.type -d syslogtype)
|
||||||
|
|
||||||
[ -n "$syslogserver" ] && echo $syslogserver > /tmp/syslog.server
|
[ -n "$syslogserver" ] && echo $syslogserver > /tmp/syslog.server
|
||||||
[ -n "$syslogfilters" ] && echo "$syslogfilters" > /tmp/syslog.filters
|
[ -n "$syslogfilters" ] && echo "$syslogfilters" > /tmp/syslog.filters
|
||||||
|
|
|
@ -15,7 +15,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
source_conf /etc/conf.d
|
source_conf /etc/conf.d
|
||||||
|
|
||||||
# run scriptlets to parse the command line
|
# run scriptlets to parse the command line
|
||||||
getarg 'rd.break=cmdline' 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
|
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
|
||||||
source_hook cmdline
|
source_hook cmdline
|
||||||
|
|
||||||
[ -z "$root" ] && die "No or empty root= argument"
|
[ -z "$root" ] && die "No or empty root= argument"
|
||||||
|
|
|
@ -9,9 +9,9 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
source_conf /etc/conf.d
|
||||||
|
|
||||||
getarg 'rd.break=initqueue' 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
|
getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
|
||||||
|
|
||||||
RDRETRY=$(getarg rd.retry 'rd_retry=')
|
RDRETRY=$(getarg rd.retry -d 'rd_retry=')
|
||||||
RDRETRY=${RDRETRY:-20}
|
RDRETRY=${RDRETRY:-20}
|
||||||
RDRETRY=$(($RDRETRY*2))
|
RDRETRY=$(($RDRETRY*2))
|
||||||
export RDRETRY
|
export RDRETRY
|
||||||
|
@ -71,11 +71,11 @@ unset RDRETRY
|
||||||
|
|
||||||
# pre-mount happens before we try to mount the root filesystem,
|
# pre-mount happens before we try to mount the root filesystem,
|
||||||
# and happens once.
|
# and happens once.
|
||||||
getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
|
getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
|
||||||
source_hook pre-mount
|
source_hook pre-mount
|
||||||
|
|
||||||
|
|
||||||
getarg 'rd.break=mount' 'rdbreak=mount' && emergency_shell -n mount "Break mount"
|
getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break mount"
|
||||||
# mount scripts actually try to mount the root filesystem, and may
|
# mount scripts actually try to mount the root filesystem, and may
|
||||||
# be sourced any number of times. As soon as one suceeds, no more are sourced.
|
# be sourced any number of times. As soon as one suceeds, no more are sourced.
|
||||||
i=0
|
i=0
|
||||||
|
|
|
@ -37,6 +37,6 @@ echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf
|
||||||
# remove helper symlink
|
# remove helper symlink
|
||||||
[ -h /dev/root ] && rm -f /dev/root
|
[ -h /dev/root ] && rm -f /dev/root
|
||||||
|
|
||||||
getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,8 +9,8 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
source_conf /etc/conf.d
|
||||||
|
|
||||||
getargbool 0 rd.udev.info -y rdudevinfo && udevadm control --log-priority=info
|
getargbool 0 rd.udev.info -n -y rdudevinfo && udevadm control --log-priority=info
|
||||||
getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control --log-priority=debug
|
getargbool 0 rd.udev.debug -n -y rdudevdebug && udevadm control --log-priority=debug
|
||||||
udevproperty "hookdir=$hookdir"
|
udevproperty "hookdir=$hookdir"
|
||||||
|
|
||||||
source_hook pre-trigger
|
source_hook pre-trigger
|
||||||
|
|
|
@ -103,24 +103,41 @@ _dogetarg() {
|
||||||
|
|
||||||
getarg() {
|
getarg() {
|
||||||
debug_off
|
debug_off
|
||||||
|
local _deprecated _newoption
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
-d) _deprecated=1; shift;;
|
||||||
-y) if _dogetarg $2 >/dev/null; then
|
-y) if _dogetarg $2 >/dev/null; then
|
||||||
|
if [ "$_deprecated" = "1" ]; then
|
||||||
|
[ -n "$_newoption" ] && warn "Option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated."
|
||||||
|
fi
|
||||||
echo 1
|
echo 1
|
||||||
debug_on
|
debug_on
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
_deprecated=0
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-n) if _dogetarg $2 >/dev/null; then
|
-n) if _dogetarg $2 >/dev/null; then
|
||||||
echo 0;
|
echo 0;
|
||||||
|
if [ "$_deprecated" = "1" ]; then
|
||||||
|
[ -n "$_newoption" ] && warn "Option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated."
|
||||||
|
fi
|
||||||
debug_on
|
debug_on
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
_deprecated=0
|
||||||
shift 2;;
|
shift 2;;
|
||||||
*) if _dogetarg $1; then
|
*) if [ -z "$_newoption" ]; then
|
||||||
|
_newoption=$1
|
||||||
|
fi
|
||||||
|
if _dogetarg $1; then
|
||||||
|
if [ "$_deprecated" = "1" ]; then
|
||||||
|
[ -n "$_newoption" ] && warn "Option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated."
|
||||||
|
fi
|
||||||
debug_on
|
debug_on
|
||||||
return 0;
|
return 0;
|
||||||
fi
|
fi
|
||||||
|
_deprecated=0
|
||||||
shift;;
|
shift;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -168,15 +185,26 @@ _dogetargs() {
|
||||||
|
|
||||||
getargs() {
|
getargs() {
|
||||||
debug_off
|
debug_off
|
||||||
local _val _i _args _gfound
|
local _val _i _args _gfound _deprecated
|
||||||
unset _val
|
unset _val
|
||||||
unset _gfound
|
unset _gfound
|
||||||
|
_newoption="$1"
|
||||||
_args="$@"
|
_args="$@"
|
||||||
set --
|
set --
|
||||||
for _i in $_args; do
|
for _i in $_args; do
|
||||||
|
if [ "$i" = "-d" ]; then
|
||||||
|
_deprecated=1
|
||||||
|
continue
|
||||||
|
fi
|
||||||
_val="$(_dogetargs $_i)"
|
_val="$(_dogetargs $_i)"
|
||||||
[ $? -eq 0 ] && _gfound=1
|
if [ $? -eq 0 ]; then
|
||||||
|
if [ "$_deprecated" = "1" ]; then
|
||||||
|
[ -n "$_newoption" ] && warn "Option '$_i' is deprecated, use '$_newoption' instead." || warn "Option $_i is deprecated!"
|
||||||
|
fi
|
||||||
|
_gfound=1
|
||||||
|
fi
|
||||||
[ -n "$_val" ] && set -- "$@" "$_val"
|
[ -n "$_val" ] && set -- "$@" "$_val"
|
||||||
|
_deprecated=0
|
||||||
done
|
done
|
||||||
if [ -n "$_gfound" ]; then
|
if [ -n "$_gfound" ]; then
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
|
@ -250,7 +278,7 @@ setdebug() {
|
||||||
if [ -z "$RD_DEBUG" ]; then
|
if [ -z "$RD_DEBUG" ]; then
|
||||||
if [ -e /proc/cmdline ]; then
|
if [ -e /proc/cmdline ]; then
|
||||||
RD_DEBUG=no
|
RD_DEBUG=no
|
||||||
if getargbool 0 rd.debug -y rdinitdebug -y rdnetdebug; then
|
if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
|
||||||
RD_DEBUG=yes
|
RD_DEBUG=yes
|
||||||
[ -n "$BASH" ] && \
|
[ -n "$BASH" ] && \
|
||||||
export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';
|
export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';
|
||||||
|
@ -314,8 +342,8 @@ die() {
|
||||||
check_quiet() {
|
check_quiet() {
|
||||||
if [ -z "$DRACUT_QUIET" ]; then
|
if [ -z "$DRACUT_QUIET" ]; then
|
||||||
DRACUT_QUIET="yes"
|
DRACUT_QUIET="yes"
|
||||||
getargbool 0 rd.info -y rdinfo && DRACUT_QUIET="no"
|
getargbool 0 rd.info -d -y rdinfo && DRACUT_QUIET="no"
|
||||||
getargbool 0 rd.debug -y rdinitdebug && DRACUT_QUIET="no"
|
getargbool 0 rd.debug -d -y rdinitdebug && DRACUT_QUIET="no"
|
||||||
getarg quiet || DRACUT_QUIET="yes"
|
getarg quiet || DRACUT_QUIET="yes"
|
||||||
a=$(getarg loglevel=)
|
a=$(getarg loglevel=)
|
||||||
[ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes"
|
[ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes"
|
||||||
|
@ -831,7 +859,7 @@ emergency_shell()
|
||||||
source_hook "$hook"
|
source_hook "$hook"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if getargbool 1 rd.shell -y rdshell || getarg rd.break rdbreak; then
|
if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
|
||||||
if [ -x /lib/systemd/systemd ]; then
|
if [ -x /lib/systemd/systemd ]; then
|
||||||
> /.console_lock
|
> /.console_lock
|
||||||
echo "PS1=\"$_rdshell_name:\${PWD}# \"" >/etc/profile
|
echo "PS1=\"$_rdshell_name:\${PWD}# \"" >/etc/profile
|
||||||
|
|
|
@ -108,7 +108,7 @@ fi
|
||||||
source_conf /etc/conf.d
|
source_conf /etc/conf.d
|
||||||
|
|
||||||
# run scriptlets to parse the command line
|
# run scriptlets to parse the command line
|
||||||
getarg 'rd.break=cmdline' 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
|
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
|
||||||
source_hook cmdline
|
source_hook cmdline
|
||||||
|
|
||||||
[ -z "$root" ] && die "No or empty root= argument"
|
[ -z "$root" ] && die "No or empty root= argument"
|
||||||
|
@ -117,7 +117,7 @@ source_hook cmdline
|
||||||
export root rflags fstype netroot NEWROOT
|
export root rflags fstype netroot NEWROOT
|
||||||
|
|
||||||
# pre-udev scripts run before udev starts, and are run only once.
|
# pre-udev scripts run before udev starts, and are run only once.
|
||||||
getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev"
|
getarg 'rd.break=pre-udev' -d 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev"
|
||||||
source_hook pre-udev
|
source_hook pre-udev
|
||||||
|
|
||||||
# start up udev and trigger cold plugs
|
# start up udev and trigger cold plugs
|
||||||
|
@ -131,11 +131,11 @@ if [ $UDEVVERSION -lt 140 ]; then
|
||||||
UDEV_QUEUE_EMPTY="udevadm settle --timeout=1"
|
UDEV_QUEUE_EMPTY="udevadm settle --timeout=1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
getargbool 0 rd.udev.info -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_ARG=info"
|
getargbool 0 rd.udev.info -d -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_ARG=info"
|
||||||
getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug"
|
getargbool 0 rd.udev.debug -d -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug"
|
||||||
udevproperty "hookdir=$hookdir"
|
udevproperty "hookdir=$hookdir"
|
||||||
|
|
||||||
getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger"
|
getarg 'rd.break=pre-trigger' -d 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger"
|
||||||
source_hook pre-trigger
|
source_hook pre-trigger
|
||||||
|
|
||||||
udevadm control --reload >/dev/null 2>&1 || :
|
udevadm control --reload >/dev/null 2>&1 || :
|
||||||
|
@ -143,9 +143,9 @@ udevadm control --reload >/dev/null 2>&1 || :
|
||||||
udevadm trigger --type=subsystems --action=add >/dev/null 2>&1
|
udevadm trigger --type=subsystems --action=add >/dev/null 2>&1
|
||||||
udevadm trigger --type=devices --action=add >/dev/null 2>&1
|
udevadm trigger --type=devices --action=add >/dev/null 2>&1
|
||||||
|
|
||||||
getarg 'rd.break=initqueue' 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
|
getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
|
||||||
|
|
||||||
RDRETRY=$(getarg rd.retry 'rd_retry=')
|
RDRETRY=$(getarg rd.retry -d 'rd_retry=')
|
||||||
RDRETRY=${RDRETRY:-20}
|
RDRETRY=${RDRETRY:-20}
|
||||||
RDRETRY=$(($RDRETRY*2))
|
RDRETRY=$(($RDRETRY*2))
|
||||||
export RDRETRY
|
export RDRETRY
|
||||||
|
@ -202,11 +202,11 @@ unset RDRETRY
|
||||||
|
|
||||||
# pre-mount happens before we try to mount the root filesystem,
|
# pre-mount happens before we try to mount the root filesystem,
|
||||||
# and happens once.
|
# and happens once.
|
||||||
getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
|
getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
|
||||||
source_hook pre-mount
|
source_hook pre-mount
|
||||||
|
|
||||||
|
|
||||||
getarg 'rd.break=mount' 'rdbreak=mount' && emergency_shell -n mount "Break mount"
|
getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break mount"
|
||||||
# mount scripts actually try to mount the root filesystem, and may
|
# mount scripts actually try to mount the root filesystem, and may
|
||||||
# be sourced any number of times. As soon as one suceeds, no more are sourced.
|
# be sourced any number of times. As soon as one suceeds, no more are sourced.
|
||||||
i=0
|
i=0
|
||||||
|
@ -237,11 +237,11 @@ done
|
||||||
|
|
||||||
# pre pivot scripts are sourced just before we doing cleanup and switch over
|
# pre pivot scripts are sourced just before we doing cleanup and switch over
|
||||||
# to the new root.
|
# to the new root.
|
||||||
getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot"
|
getarg 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot"
|
||||||
source_hook pre-pivot
|
source_hook pre-pivot
|
||||||
|
|
||||||
# pre pivot cleanup scripts are sourced just before we switch over to the new root.
|
# pre pivot cleanup scripts are sourced just before we switch over to the new root.
|
||||||
getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup"
|
getarg 'rd.break=cleanup' -d 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup"
|
||||||
source_hook cleanup
|
source_hook cleanup
|
||||||
|
|
||||||
# By the time we get here, the root filesystem should be mounted.
|
# By the time we get here, the root filesystem should be mounted.
|
||||||
|
@ -340,7 +340,7 @@ wait_for_loginit
|
||||||
# remove helper symlink
|
# remove helper symlink
|
||||||
[ -h /dev/root ] && rm -f /dev/root
|
[ -h /dev/root ] && rm -f /dev/root
|
||||||
|
|
||||||
getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
||||||
info "Switching root"
|
info "Switching root"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ mount_root() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rootopts=
|
rootopts=
|
||||||
if getargbool 1 rd.fstab -n rd_NO_FSTAB \
|
if getargbool 1 rd.fstab -d -n rd_NO_FSTAB \
|
||||||
&& ! getarg rootflags \
|
&& ! getarg rootflags \
|
||||||
&& [ -f "$NEWROOT/etc/fstab" ] \
|
&& [ -f "$NEWROOT/etc/fstab" ] \
|
||||||
&& ! [ -L "$NEWROOT/etc/fstab" ]; then
|
&& ! [ -L "$NEWROOT/etc/fstab" ]; then
|
||||||
|
|
Loading…
Reference in New Issue