From: Harald Hoyer Date: Thu, 28 Oct 2010 10:47:45 +0000 (+0200) Subject: new parameter option names with "rd.*" namespace X-Git-Tag: 008~96 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa7ada31d0228f8aeedb03bae72469e2838839fe;p=thirdparty%2Fdracut.git new parameter option names with "rd.*" namespace Renamed Options Here is a list of options, which were used in dracut prior to version 008, and their new replacement. rdbreak rd.break rd_CCW rd.ccw rdcopystate rd.copystate rd_DASD_MOD rd.dasd_mod.dasd rd_DASD rd.dasd rdinitdebug rdnetdebug rd.debug rd_NO_DM rd.dm=0 rd_DM_UUID rd.dm.uuid rdblacklist rd.driver.blacklist rdinsmodpost rd.driver.post rdloaddriver rd.driver.pre rd_NO_FSTAB rd.fstab=0 rdinfo rd.info check rd.live.check rdlivedebug rd.live.debug live_dir rd.live.dir liveimg rd.live.image overlay rd.live.overlay readonly_overlay rd.live.overlay.readonly reset_overlay rd.live.overlay.reset live_ram rd.live.ram rd_NO_CRYPTTAB rd.luks.crypttab=0 rd_LUKS_KEYDEV_UUID rd.luks.keydev.uuid rd_LUKS_KEYPATH rd.luks.keypath rd_NO_LUKS rd.luks=0 rd_LUKS_UUID rd.luks.uuid rd_LUKS_UUID rd.luks.uuid rd_NO_LVMCONF rd.lvm.conf rd_LVM_LV rd.lvm.lv rd_NO_LVM rd.lvm=0 rd_LVM_SNAPSHOT rd.lvm.snapshot rd_LVM_SNAPSIZE rd.lvm.snapsize rd_LVM_VG rd.lvm.vg rd_NO_MDADMCONF rd.md.conf=0 rd_NO_MDIMSM rd.md.imsm=0 rd_NO_MD rd.md=0 rd_MD_UUID rd.md.uuid rd_NFS_DOMAIN rd.nfs.domain rd_NO_PLYMOUTH rd.plymouth=0 rd_retry rd.retry rdshell rd.shell rd_NO_SPLASH rd.splash rdudevdebug rd.udev.debug rdudevinfo rd.udev.info rd_NO_ZFCPCONF rd.zfcp.conf=0 rd_ZFCP rd.zfcp --- diff --git a/dracut.kernel.7.xml b/dracut.kernel.7.xml index 0c5e5d89f..e95980d76 100644 --- a/dracut.kernel.7.xml +++ b/dracut.kernel.7.xml @@ -71,9 +71,7 @@ accordingly. - - rd_NO_FSTAB - + rd.fstab=0 do not honor special mount options for the root filesystem found in /etc/fstab of the real root. @@ -86,7 +84,7 @@ accordingly. - rdblacklist=<drivername> + rd.driver.blacklist=<drivername> do not load kernel module <drivername> @@ -95,7 +93,7 @@ This parameter can be specified multiple times. - rdloaddriver=<drivername> + rd.driver.pre=<drivername> force loading kernel module <drivername> @@ -109,7 +107,7 @@ This parameter can be specified multiple times. - rdinfo + rd.info print informational output though "quiet" is set @@ -117,7 +115,7 @@ This parameter can be specified multiple times. - rdshell + rd.shell allow dropping to a shell, if root mounting fails @@ -125,7 +123,7 @@ This parameter can be specified multiple times. - rdinitdebug + rd.debug set -x for the dracut shell and logs to dmesg, console and /init.log @@ -133,7 +131,7 @@ This parameter can be specified multiple times. - rdbreak + rd.break drop to a shell at the end @@ -141,7 +139,7 @@ This parameter can be specified multiple times. - rdbreak= + rd.break= {cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot} @@ -150,7 +148,7 @@ This parameter can be specified multiple times. - rdudevinfo + rd.udev.info set udev to loglevel info @@ -158,7 +156,7 @@ This parameter can be specified multiple times. - rdudevdebug + rd.udev.debug set udev to loglevel debug @@ -255,34 +253,32 @@ This parameter can be specified multiple times. LVM - - rd_NO_LVM - + rd.lvm=0 disable LVM detection - rd_LVM_VG=<volume group name> + rd.lvm.vg=<volume group name> only activate the volume groups with the given name -rd_LVM_VG can be specified multiple times on the kernel command line. +rd.lvm.vg can be specified multiple times on the kernel command line. - rd_LVM_LV=<logical volume name> + rd.lvm.lv=<logical volume name> only activate the logical volumes with the given name -rd_LVM_LV can be specified multiple times on the kernel command line. +rd.lvm.lv can be specified multiple times on the kernel command line. - rd_NO_LVMCONF + rd.lvm.conf remove any /etc/lvm/lvm.conf, which may exist in the initramfs @@ -294,16 +290,14 @@ This parameter can be specified multiple times. crypto LUKS - - rd_NO_LUKS - + rd.luks=0 disable crypto LUKS detection - rd_LUKS_UUID=<luks uuid> + rd.luks.uuid=<luks uuid> only activate the LUKS partitions with the given UUID @@ -315,7 +309,7 @@ This parameter can be specified multiple times. - rd_NO_CRYPTTAB + rd.luks.crypttab do not check, if LUKS partition is in /etc/crypttab @@ -329,7 +323,7 @@ This parameter can be specified multiple times. - rd_LUKS_KEYPATH= + rd.luks.keypath= <path to keyfile> @@ -338,11 +332,11 @@ This parameter can be specified multiple times. - rd_LUKS_KEYDEV_UUID= + rd.luks.keydev.uuid= <rem. device uuid> - UUID of removalbe device storing keyfile; UUID doesn't have to be exact just like for rd_LUKS_UUID + UUID of removalbe device storing keyfile; UUID doesn't have to be exact just like for rd.luks.uuid @@ -351,24 +345,20 @@ This parameter can be specified multiple times. MD - - rd_NO_MD - + rd.md=0 disable MD RAID detection - - rd_NO_MDIMSM - + rd.md.imsm=0 - no MD RAID for imsm/isw raids, use dmraid instead + disable MD RAID for imsm/isw raids, use DM RAID instead - rd_NO_MDADMCONF + rd.md.conf ignore mdadm.conf included in initramfs @@ -376,7 +366,7 @@ This parameter can be specified multiple times. - rd_MD_UUID=<md uuid> + rd.md.uuid=<md raid uuid> only activate the raid sets with the given UUID. @@ -386,19 +376,17 @@ This parameter can be specified multiple times. - DMRAID + DM RAID - - rd_NO_DM - + rd.dm=0 disable DM RAID detection - rd_DM_UUID=<dmraid uuid> + rd.dm.uuid=<dm raid uuid> only activate the raid sets with the given UUID. @@ -519,7 +507,7 @@ This is supported by dracut, but not recommended. - rd_NFS_DOMAIN= + rd.nfs.domain= <NFSv4 domain name> @@ -639,14 +627,14 @@ as the rootfs. DASD - rd_DASD_MOD=.... + rd.dasd_mod.dasd=.... same syntax as the kernel module parameter (s390 only) - rd_DASD= + rd.dasd= <dasd_adaptor device bus ID> ,readonly=X ,use_diag=X @@ -664,14 +652,14 @@ This parameter can be specified multiple times. ZFCP - rd_ZFCP=<zfcp adaptor device bus ID>,<WWPN>,<FCPLUN> + rd.zfcp=<zfcp adaptor device bus ID>,<WWPN>,<FCPLUN> - rd_ZFCP can be specified multiple times on the kernel command line. e.g.: rd_ZFCP=0.0.4000,0x5005076300C213e9,0x5022000000000000 + rd.zfcp can be specified multiple times on the kernel command line. e.g.: rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000 - rd_NO_ZFCPCONF + rd.zfcp.conf ignore zfcp.conf included in the initramfs @@ -695,12 +683,384 @@ rd_ZNET=ctc,0.0.0600,0.0.0601,0.0.0602,protocol=bar Plymouth Boot Splash + + rd.plymouth=0 + + disable plymouth. This will not work with encrypted partitions. + + + + + + Deprecated, renamed Options + Here is a list of options, which were used in dracut prior to version 008, and their new replacement. + + + + rdbreak + + + rd.break + + + + + rd_CCW + + + rd.ccw + + + + + rdcopystate + + + rd.copystate + + + + + rd_DASD_MOD + + + rd.dasd_mod.dasd + + + + + rd_DASD + + + rd.dasd + + + + + rdinitdebug rdnetdebug + + + rd.debug + + + + + rd_NO_DM + + + rd.dm=0 + + + + + rd_DM_UUID + + + rd.dm.uuid + + + + + rdblacklist + + + rd.driver.blacklist + + + + + rdinsmodpost + + + rd.driver.post + + + + + rdloaddriver + + + rd.driver.pre + + + + + rd_NO_FSTAB + + + rd.fstab=0 + + + + + rdinfo + + + rd.info + + + + + check + + + rd.live.check + + + + + rdlivedebug + + + rd.live.debug + + + + + live_dir + + + rd.live.dir + + + + + liveimg + + + rd.live.image + + + + + overlay + + + rd.live.overlay + + + + + readonly_overlay + + + rd.live.overlay.readonly + + + + + reset_overlay + + + rd.live.overlay.reset + + + + + live_ram + + + rd.live.ram + + + + + rd_NO_CRYPTTAB + + + rd.luks.crypttab=0 + + + + + rd_LUKS_KEYDEV_UUID + + + rd.luks.keydev.uuid + + + + + rd_LUKS_KEYPATH + + + rd.luks.keypath + + + + + rd_NO_LUKS + + + rd.luks=0 + + + + + rd_LUKS_UUID + + + rd.luks.uuid + + + + + rd_LUKS_UUID + + + rd.luks.uuid + + + + + rd_NO_LVMCONF + + + rd.lvm.conf + + + + + rd_LVM_LV + + + rd.lvm.lv + + + + + rd_NO_LVM + + + rd.lvm=0 + + + + + rd_LVM_SNAPSHOT + + + rd.lvm.snapshot + + + + + rd_LVM_SNAPSIZE + + + rd.lvm.snapsize + + + + + rd_LVM_VG + + + rd.lvm.vg + + + + + rd_NO_MDADMCONF + + + rd.md.conf=0 + + + + + rd_NO_MDIMSM + + + rd.md.imsm=0 + + + + + rd_NO_MD + + + rd.md=0 + + + + + rd_MD_UUID + + + rd.md.uuid + + + + + rd_NFS_DOMAIN + + + rd.nfs.domain + + rd_NO_PLYMOUTH - do not start plymouth. This will not work with encrypted partitions. + rd.plymouth=0 + + + + + rd_retry + + + rd.retry + + + + + rdshell + + + rd.shell + + + + + rd_NO_SPLASH + + + rd.splash + + + + + rdudevdebug + + + rd.udev.debug + + + + + rdudevinfo + + + rd.udev.info + + + + + rd_NO_ZFCPCONF + + + rd.zfcp.conf=0 + + + + + rd_ZFCP + + + rd.zfcp diff --git a/dracut.xml b/dracut.xml index 502683e83..01314e3e9 100644 --- a/dracut.xml +++ b/dracut.xml @@ -77,7 +77,7 @@ Any hardware drivers that the boot process depends on must be loaded. All kernel modules for common storage devices are packed onto the initramfs and then udev pulls in modules matching the computer's detected hardware. - On systems which display a boot splash screen, the video hardware must be initialized and a user-space helper started to paint animations onto the display in lockstep with the boot process. + On systems which display a boot rd.splash screen, the video hardware must be initialized and a user-space helper started to paint animations onto the display in lockstep with the boot process. If the root file system is on NFS, dracut does then: @@ -121,7 +121,7 @@ The root file system is mounted read-only. - Any processes which must continue running (such as the splash screen helper and its command FIFO) are hoisted into the newly-mounted root file system. + Any processes which must continue running (such as the rd.splash screen helper and its command FIFO) are hoisted into the newly-mounted root file system. The final root file system cannot simply be mounted over /, since that would make the scripts and tools on the initial root file system inaccessible for any final cleanup tasks. On an initramfs, the initial root file system cannot be rotated away. Instead, it is simply emptied and the final root file system mounted over the top. @@ -222,20 +222,20 @@ include ld.so.conf.d/*.conf The option let you specify a source path and a target path. For example # dracut --include cmdline-preset /etc/cmdline initramfs-cmdline-pre.img will create an initramfs image, where the file cmdline-preset will be copied inside the initramfs to /etc/cmdline. can only be specified once. - # mkdir overlay -# mkdir overlay/etc -# mkdir overlay/etc/conf.d -# echo "ip=auto" >> overlay/etc/cmdline -# echo export TESTVAR=testtest >> overlay/etc/conf.d/testvar.conf -# echo export TESTVAR=testtest >> overlay/etc/conf.d/testvar.conf -# tree overlay/ -overlay/ + # mkdir rd.live.overlay +# mkdir rd.live.overlay/etc +# mkdir rd.live.overlay/etc/conf.d +# echo "ip=auto" >> rd.live.overlay/etc/cmdline +# echo export TESTVAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf +# echo export TESTVAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf +# tree rd.live.overlay/ +rd.live.overlay/ └── etc ├── cmdline └── conf.d └── testvar.conf -# dracut --include overlay / initramfs-overlay.img - This will put the contents of the overlay directory into the root of the initramfs image. +# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img + This will put the contents of the rd.live.overlay directory into the root of the initramfs image. The option let you specify several files, which will get installed in the initramfs image at the same location, as they are present on initramfs creation time. # dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img This will create an initramfs with the strace, fsck.ext3 and ssh executables, together with the libraries needed to start those. The option can be specified multiple times. @@ -286,15 +286,15 @@ overlay/ - Add ''rdshell'' to the kernel command line. This will present a shell should dracut be unable to locate your root device + Add ''rd.shell'' to the kernel command line. This will present a shell should dracut be unable to locate your root device - Add ''rdshell rdinitdebug'' to the kernel command line so that dracut shell commands are printed as they are executed + Add ''rd.shell rd.debug'' to the kernel command line so that dracut shell commands are printed as they are executed - With dracut >= 002-11, you can inspect the rdinitdebug output with: + With dracut >= 002-11, you can inspect the rd.debug output with: # less /init.log # dmesg | less @@ -414,7 +414,7 @@ title Fedora (2.6.29.5-191.fc11.x86_64) Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell: - Add the boot parameter ''rdshell'' to your bootloader configuration file (e.g. /etc/grub.conf) + Add the boot parameter ''rd.shell'' to your bootloader configuration file (e.g. /etc/grub.conf) Remove the boot arguments ''rhgb'' and ''quiet'' @@ -428,7 +428,7 @@ serial --unit=0 --speed=9600 terminal --timeout=5 serial console title Fedora (2.6.29.5-191.fc11.x86_64) root (hd0,0) - kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rdshell + kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell initrd /dracut-2.6.29.5-191.fc11.x86_64.img @@ -609,9 +609,9 @@ Common used functions are in dracut-lib.sh, which can be so install: inst_hook cmdline 20 "$moddir/parse-insmodpost.sh" inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh - The pase-instmodpost.sh parses the kernel command line for a argument rdinsmodpost, blacklists the module from being autoloaded and installs the hook insmodpost.sh in the initqueue-settled. + The pase-instmodpost.sh parses the kernel command line for a argument rd.driver.post, blacklists the module from being autoloaded and installs the hook insmodpost.sh in the initqueue-settled. parse-insmodpost.sh: - for p in $(getargs rdinsmodpost=); do + for p in $(getargs rd.driver.post=); do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf _do_insmodpost=1 done @@ -619,11 +619,11 @@ done [ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh unset _do_insmodpost - insmodpost.sh, which is called in the initqueue-settled hook will just modprobe the kernel modules specified in all rdinsmodpost kernel command line parameters. It runs after udev has settled and is only called once (--onetime). + insmodpost.sh, which is called in the initqueue-settled hook will just modprobe the kernel modules specified in all rd.driver.post kernel command line parameters. It runs after udev has settled and is only called once (--onetime). insmodpost.sh: . /lib/dracut-lib.sh -for p in $(getargs rdinsmodpost=); do +for p in $(getargs rd.driver.post=); do modprobe $p done diff --git a/modules.d/50gensplash/gensplash-pretrigger.sh b/modules.d/50gensplash/gensplash-pretrigger.sh index 47bd9a083..5350405d5 100755 --- a/modules.d/50gensplash/gensplash-pretrigger.sh +++ b/modules.d/50gensplash/gensplash-pretrigger.sh @@ -2,7 +2,7 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if ! getarg rd_NO_SPLASH; then +if getargbool 1 rd.splash -n rd_NO_SPLASH; then [ -c /dev/null ] || mknod /dev/null c 1 3 [ -c /dev/console ] || mknod /dev/console c 5 1 [ -c /dev/tty0 ] || mknod /dev/tty0 c 4 0 diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh index 6662ec7a4..0800dbc1b 100755 --- a/modules.d/50plymouth/plymouth-pretrigger.sh +++ b/modules.d/50plymouth/plymouth-pretrigger.sh @@ -2,7 +2,7 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if ! getarg rd_NO_PLYMOUTH; then +if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3 # first trigger graphics subsystem udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 diff --git a/modules.d/90crypt/crypt-cleanup.sh b/modules.d/90crypt/crypt-cleanup.sh index e9fc6bacf..1b42fb50a 100755 --- a/modules.d/90crypt/crypt-cleanup.sh +++ b/modules.d/90crypt/crypt-cleanup.sh @@ -4,10 +4,12 @@ # close everything which is not busy rm -f /etc/udev/rules.d/70-luks.rules >/dev/null 2>&1 -while true; do - local do_break="y" - for i in /dev/mapper/luks-*; do - cryptsetup luksClose $i >/dev/null 2>&1 && do_break=n +if ! getarg rd.luks.uuid rd_LUKS_UUID && getargbool 1 rd.luks -n rd_NO_LUKS; then + while true; do + local do_break="y" + for i in /dev/mapper/luks-*; do + cryptsetup luksClose $i >/dev/null 2>&1 && do_break=n + done + [ "$do_break" = "y" ] && break done - [ "$do_break" = "y" ] && break -done +fi diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh index 45b5fe74b..6c3acb662 100755 --- a/modules.d/90crypt/cryptroot-ask.sh +++ b/modules.d/90crypt/cryptroot-ask.sh @@ -26,7 +26,7 @@ else device="$1" fi -if [ -f /etc/crypttab ] && ! getarg rd_NO_CRYPTTAB; then +if [ -f /etc/crypttab ] && getargbool 1 rd.luks.crypttab -n rd_NO_CRYPTTAB; then while read name dev rest; do # ignore blank lines and comments if [ -z "$name" -o "${name#\#}" != "$name" ]; then @@ -84,11 +84,11 @@ probe_keydev() { return ${ret} } -keypaths="$(getargs rd_LUKS_KEYPATH)" +keypaths="$(getargs rd.luks.keypath rd_LUKS_KEYPATH)" unset keydev_uuid keypath if [ -n "$keypaths" ]; then - keydev_uuids="$(getargs rd_LUKS_KEYDEV_UUID)" + keydev_uuids="$(getargs rd.luks.keydev.uuid rd_LUKS_KEYDEV_UUID)" [ -n "$keydev_uuids" ] || { warn 'No UUID of device storing LUKS key specified.' warn 'It is recommended to set rd_LUKS_KEYDEV_UUID.' diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh index 888b1b024..3baad5fb8 100755 --- a/modules.d/90crypt/parse-crypt.sh +++ b/modules.d/90crypt/parse-crypt.sh @@ -1,8 +1,8 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if getarg rd_NO_LUKS; then - info "rd_NO_LUKS: removing cryptoluks activation" +if ! getargbool 1 rd.luks -n rd_NO_LUKS; then + info "rd.luks=0: removing cryptoluks activation" rm -f /etc/udev/rules.d/70-luks.rules else { @@ -10,10 +10,10 @@ else echo 'ACTION!="add|change", GOTO="luks_end"' } > /etc/udev/rules.d/70-luks.rules - LUKS=$(getargs rd_LUKS_UUID) + LUKS=$(getargs rd.luks.uuid rd_LUKS_UUID) unset settled - [ -n "$(getargs rd_LUKS_KEYPATH)" ] && \ - [ -z "$(getargs rd_LUKS_KEYDEV_UUID)" ] && \ + [ -n "$(getargs rd.luks.keypath rd_LUKS_KEYPATH)" ] && \ + [ -z "$(getargs rd.luks.keydev.uuid rd_LUKS_KEYDEV_UUID)" ] && \ settled='--settled' if [ -n "$LUKS" ]; then diff --git a/modules.d/90dmraid/dmraid.sh b/modules.d/90dmraid/dmraid.sh index f7f96594b..febc56143 100755 --- a/modules.d/90dmraid/dmraid.sh +++ b/modules.d/90dmraid/dmraid.sh @@ -4,7 +4,7 @@ . /lib/dracut-lib.sh -DM_RAIDS=$(getargs rd_DM_UUID=) +DM_RAIDS=$(getargs rd.dm.uuid rd_DM_UUID=) DM_CLEANUP="no" diff --git a/modules.d/90dmraid/parse-dm.sh b/modules.d/90dmraid/parse-dm.sh index b722c409a..73b09bca1 100755 --- a/modules.d/90dmraid/parse-dm.sh +++ b/modules.d/90dmraid/parse-dm.sh @@ -1,13 +1,13 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh # nodmraid for anaconda / rc.sysinit compatibility -if getarg rd_NO_DM || getarg nodmraid; then - info "rd_NO_DM: removing DM RAID activation" +if ! getargbool 1 rd.dm -n rd_NO_DM || getarg nodmraid; then + info "rd.dm=0: removing DM RAID activation" udevproperty rd_NO_DM=1 fi -if [ ! -x /sbin/mdadm ] || getarg rd_NO_MDIMSM || getarg noiswmd; then - info "rd_NO_MDIMSM: no MD RAID for imsm/isw raids" +if [ ! -x /sbin/mdadm ] || ! getargbool 1 rd.md.imsm -n rd_NO_MDIMSM || getarg noiswmd; then + info "rd.md.imsm=0: no MD RAID for imsm/isw raids" udevproperty rd_NO_MDIMSM=1 fi diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root index 1716a6877..d4ba8395b 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root +++ b/modules.d/90dmsquash-live/dmsquash-live-root @@ -7,7 +7,7 @@ PATH=$PATH:/sbin:/usr/sbin -if getarg rdlivedebug; then +if getargbool 0 rd.live.debug -y rdlivedebug; then exec > /tmp/liveroot.$$.out exec 2>> /tmp/liveroot.$$.out set -x @@ -18,19 +18,19 @@ livedev="$1" # parse various live image specific options that make sense to be # specified as their own things -live_dir=$(getarg live_dir) +live_dir=$(getarg rd.live.dir live_dir) [ -z "$live_dir" ] && live_dir="LiveOS" -getarg live_ram && live_ram="yes" -getarg reset_overlay && reset_overlay="yes" -getarg readonly_overlay && readonly_overlay="--readonly" || readonly_overlay="" -overlay=$(getarg overlay) +getargbool 0 rd.live.ram -y live_ram && live_ram="yes" +getargbool 0 rd.live.overlay.reset -y reset_overlay && reset_overlay="yes" +getargbool 0 rd.live.overlay.readonly -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay="" +overlay=$(getarg rd.live.overlay overlay) # FIXME: we need to be able to hide the plymouth splash for the check really [ -e $livedev ] & fs=$(blkid -s TYPE -o value $livedev) if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then check="yes" fi -getarg check || check="" +getarg rd.live.check check || check="" if [ -n "$check" ]; then checkisomd5 --verbose $livedev || : if [ $? -ne 0 ]; then diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh index dfab959f9..38610fb11 100755 --- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh +++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh @@ -7,7 +7,7 @@ [ -z "$root" ] && root=$(getarg root=) # support legacy syntax of passing liveimg and then just the base root -if getarg liveimg; then +if getargbool 0 rd.live.image -y liveimg; then liveroot="live:$root" fi diff --git a/modules.d/90kernel-modules/parse-kernel.sh b/modules.d/90kernel-modules/parse-kernel.sh index 7b2503dc8..509bbcf32 100755 --- a/modules.d/90kernel-modules/parse-kernel.sh +++ b/modules.d/90kernel-modules/parse-kernel.sh @@ -2,6 +2,6 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -for p in $(getargs rdloaddriver=); do +for p in $(getargs rd.loaddriver rdloaddriver=); do modprobe $p done diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh index 5c3fb5c58..e705d3946 100755 --- a/modules.d/90lvm/lvm_scan.sh +++ b/modules.d/90lvm/lvm_scan.sh @@ -6,10 +6,10 @@ . /lib/dracut-lib.sh -VGS=$(getargs rd_LVM_VG=) -LVS=$(getargs rd_LVM_LV=) -SNAPSHOT=$(getargs rd_LVM_SNAPSHOT=) -SNAPSIZE=$(getargs rd_LVM_SNAPSIZE=) +VGS=$(getargs rd.lvm.vg rd_LVM_VG=) +LVS=$(getargs rd.lvm.lv rd_LVM_LV=) +SNAPSHOT=$(getargs rd.lvm.snapshot rd_LVM_SNAPSHOT=) +SNAPSIZE=$(getargs rd.lvm.snapsize rd_LVM_SNAPSIZE=) [ -d /etc/lvm ] || mkdir -p /etc/lvm # build a list of devices to scan diff --git a/modules.d/90lvm/parse-lvm.sh b/modules.d/90lvm/parse-lvm.sh index e85d43e41..35876251c 100755 --- a/modules.d/90lvm/parse-lvm.sh +++ b/modules.d/90lvm/parse-lvm.sh @@ -1,14 +1,14 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if [ -e /etc/lvm/lvm.conf ] && getarg rd_NO_LVMCONF; then +if [ -e /etc/lvm/lvm.conf ] && ! getargbool 1 rd.lvm.conf -n rd_NO_LVMCONF; then rm -f /etc/lvm/lvm.conf fi -if getarg rd_NO_LVM; then - info "rd_NO_LVM: removing LVM activation" +if ! getargbool 1 rd.lvm -n rd_NO_LVM; then + info "rd.lvm=0: removing LVM activation" rm -f /etc/udev/rules.d/64-lvm*.rules else - for dev in $(getargs rd_LVM_VG=) $(getargs rd_LVM_LV=); do + for dev in $(getargs rd.lvm.vg rd_LVM_VG=) $(getargs rd.lvm.lv rd_LVM_LV=); do printf '[ -e "/dev/%s" ] || exit 1\n' $dev \ >> /initqueue-finished/lvm.sh { diff --git a/modules.d/90mdraid/md-noimsm.sh b/modules.d/90mdraid/md-noimsm.sh index 299c90100..f43dd7e1a 100755 --- a/modules.d/90mdraid/md-noimsm.sh +++ b/modules.d/90mdraid/md-noimsm.sh @@ -1,4 +1,4 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -info "rd_NO_MDIMSM: no MD RAID for imsm/isw raids" +info "rd.md.imsm=0: no MD RAID for imsm/isw raids" udevproperty rd_NO_MDIMSM=1 \ No newline at end of file diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh index 7f98d034a..309c5dd8f 100755 --- a/modules.d/90mdraid/parse-md.sh +++ b/modules.d/90mdraid/parse-md.sh @@ -1,10 +1,10 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if getarg rd_NO_MD; then - info "rd_NO_MD: removing MD RAID activation" +if ! getargbool 1 rd.md -n rd_NO_MD; then + info "rd.md=0: removing MD RAID activation" udevproperty rd_NO_MD=1 else - MD_UUID=$(getargs rd_MD_UUID=) + MD_UUID=$(getargs rd.md.uuid rd_MD_UUID=) # rewrite the md rules to only process the specified raid array if [ -n "$MD_UUID" ]; then @@ -27,18 +27,18 @@ else fi -if [ -e /etc/mdadm.conf ] && ! getarg rd_NO_MDADMCONF; then +if [ -e /etc/mdadm.conf ] && getargbool 1 rd.md.conf -n rd_NO_MDADMCONF; then udevproperty rd_MDADMCONF=1 rm -f /pre-pivot/*mdraid-cleanup.sh fi -if getarg rd_NO_MDADMCONF; then +if ! getargbool 1 rd.md.conf -n rd_NO_MDADMCONF; then rm -f /etc/mdadm/mdadm.conf /etc/mdadm.conf fi # noiswmd nodmraid for anaconda / rc.sysinit compatibility # note nodmraid really means nobiosraid, so we don't want MDIMSM then either -if getarg rd_NO_MDIMSM || getarg noiswmd || getarg nodmraid; then - info "rd_NO_MDIMSM: no MD RAID for imsm/isw raids" +if ! getargbool 1 rd.md.imsm -n rd_NO_MDIMSM || getarg noiswmd || getarg nodmraid; then + info "no MD RAID for imsm/isw raids" udevproperty rd_NO_MDIMSM=1 fi diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh index edf0eb476..4aeecd5d7 100755 --- a/modules.d/95dasd/parse-dasd.sh +++ b/modules.d/95dasd/parse-dasd.sh @@ -1,7 +1,7 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -for dasd_arg in $(getargs 'rd_DASD='); do +for dasd_arg in $(getargs rd.dasd 'rd_DASD='); do ( IFS="," set $dasd_arg diff --git a/modules.d/95dasd_mod/parse-dasd-mod.sh b/modules.d/95dasd_mod/parse-dasd-mod.sh index 38a9275c2..2bccab4dd 100755 --- a/modules.d/95dasd_mod/parse-dasd-mod.sh +++ b/modules.d/95dasd_mod/parse-dasd-mod.sh @@ -3,7 +3,7 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh [ -d /etc/modprobe.d ] || mkdir /etc/modprobe.d -dasd_arg=$(getarg rd_DASD_MOD=) +dasd_arg=$(getarg rd.dasd_mod.dasd rd_DASD_MOD=) if [ -n "$dasd_arg" ]; then echo "options dasd_mod dasd=$dasd_arg" >> /etc/modprobe.d/dasd_mod.conf fi diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh index 06de9fa1d..2e301013e 100755 --- a/modules.d/95nfs/parse-nfsroot.sh +++ b/modules.d/95nfs/parse-nfsroot.sh @@ -72,7 +72,7 @@ esac # Check required arguments -if nfsdomain=$(getarg rd_NFS_DOMAIN); then +if nfsdomain=$(getarg rd.nfs.domain rd_NFS_DOMAIN); then if [ -f /etc/idmapd.conf ]; then sed -i -e \ "s/^[[:space:]#]*Domain[[:space:]]*=.*/Domain = $nfsdomain/g" \ diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh index fc14f83df..ce880a570 100755 --- a/modules.d/95resume/resume-genrules.sh +++ b/modules.d/95resume/resume-genrules.sh @@ -21,7 +21,7 @@ if [ -n "$resume" ]; then echo '[ -e /dev/resume ]' > /initqueue-finished/resume.sh -elif ! getarg noresume; then +elif ! getarg noresume; then { echo "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\"," \ " RUN+=\"/bin/sh -c 'echo %M:%m > /sys/power/resume'\""; diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh index c26ad0ddf..cb4828398 100755 --- a/modules.d/95rootfs-block/mount-root.sh +++ b/modules.d/95rootfs-block/mount-root.sh @@ -29,7 +29,7 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then mount -t ${fstype:-auto} -o "$rflags" "${root#block:}" "$NEWROOT" \ && ROOTFS_MOUNTED=yes - if ! getarg rd_NO_FSTAB \ + if getargbool 1 rd.fstab -n rd_NO_FSTAB \ && ! getarg rootflags \ && [ -f "$NEWROOT/etc/fstab" ] \ && ! [ -L "$NEWROOT/etc/fstab" ]; then diff --git a/modules.d/95uswsusp/parse-uswsusp.sh b/modules.d/95uswsusp/parse-uswsusp.sh index b89e85d1f..ac18b0985 100755 --- a/modules.d/95uswsusp/parse-uswsusp.sh +++ b/modules.d/95uswsusp/parse-uswsusp.sh @@ -16,7 +16,7 @@ case "$resume" in resume="/dev/disk/by-uuid/${resume#UUID=}" ;; esac -if splash=$(getarg splash=); then +if splash=$(getarg rd.splash= splash=); then export splash else unset splash diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh index 2c0a60f2f..2ce9c6830 100755 --- a/modules.d/95zfcp/parse-zfcp.sh +++ b/modules.d/95zfcp/parse-zfcp.sh @@ -2,9 +2,9 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -getarg rd_NO_ZFCPCONF && rm /etc/zfcp.conf +getargbool 1 rd.zfcp.conf -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf -for zfcp_arg in $(getargs 'rd_ZFCP='); do +for zfcp_arg in $(getargs rd.zfcp 'rd_ZFCP='); do ( IFS="," set $zfcp_arg diff --git a/modules.d/95znet/parse-ccw.sh b/modules.d/95znet/parse-ccw.sh index 01f0cbecf..876671c09 100755 --- a/modules.d/95znet/parse-ccw.sh +++ b/modules.d/95znet/parse-ccw.sh @@ -2,7 +2,7 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -for ccw_arg in $(getargs 'rd_CCW=') $(getargs 'rd_ZNET='); do +for ccw_arg in $(getargs rd.ccw 'rd_CCW=') $(getargs rd.znet 'rd_ZNET='); do echo $ccw_arg >> /etc/ccw.conf done diff --git a/modules.d/96insmodpost/insmodpost.sh b/modules.d/96insmodpost/insmodpost.sh index f3bd78060..1571c3e8d 100755 --- a/modules.d/96insmodpost/insmodpost.sh +++ b/modules.d/96insmodpost/insmodpost.sh @@ -3,6 +3,6 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh . /lib/dracut-lib.sh -for p in $(getargs rdinsmodpost=); do +for p in $(getargs rd.insmodpost rdinsmodpost=); do modprobe $p done diff --git a/modules.d/96insmodpost/parse-insmodpost.sh b/modules.d/96insmodpost/parse-insmodpost.sh index 4cfd3558c..fd375b2fe 100755 --- a/modules.d/96insmodpost/parse-insmodpost.sh +++ b/modules.d/96insmodpost/parse-insmodpost.sh @@ -2,7 +2,7 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -for p in $(getargs rdinsmodpost=); do +for p in $(getargs rd.insmodpost rdinsmodpost=); do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf _do_insmodpost=1 done diff --git a/modules.d/98syslog/parse-syslog-opts.sh b/modules.d/98syslog/parse-syslog-opts.sh index 55d0022cb..b1c744241 100755 --- a/modules.d/98syslog/parse-syslog-opts.sh +++ b/modules.d/98syslog/parse-syslog-opts.sh @@ -11,9 +11,9 @@ # Don't auto detect syslog but set it . /lib/dracut-lib.sh -syslogserver=$(getarg syslog) -syslogfilters=$(getargs filter) -syslogtype=$(getarg syslogtype) +syslogserver=$(getarg syslog.server syslog) +syslogfilters=$(getargs syslog.filter filter) +syslogtype=$(getarg syslog.type syslogtype) [ -n "$syslogserver" ] && echo $syslogserver > /tmp/syslog.server [ -n "$syslogfilters" ] && echo "$syslogfilters" > /tmp/syslog.filters diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 627d2c5b1..596dae21d 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -6,64 +6,118 @@ strstr() { [ "${1#*$2*}" != "$1" ] } -getarg() { - set +x - local o line val +_getcmdline() { + local _line + unset _line if [ -z "$CMDLINE" ]; then if [ -e /etc/cmdline ]; then - while read line; do - CMDLINE_ETC="$CMDLINE_ETC $line"; + while read _line; do + CMDLINE_ETC="$CMDLINE_ETC $_line"; done /dev/console 1<>/dev/console 2<>/dev/console # wait for loginit @@ -47,7 +47,7 @@ emergency_shell() echo $@ source_all emergency echo - if getarg rdshell || getarg rdbreak; then + if getargbool 0 rd.shell -y rdshell || getarg rd.break rdbreak; then echo "Dropping to debug shell." echo export PS1="$_rdshell_name:\${PWD}# " @@ -98,7 +98,7 @@ ln -s /proc/self/fd/0 /dev/stdin >/dev/null 2>&1 ln -s /proc/self/fd/1 /dev/stdout >/dev/null 2>&1 ln -s /proc/self/fd/2 /dev/stderr >/dev/null 2>&1 -if getarg rdinitdebug; then +if getargbool 0 rd.debug -y rdinitdebug -y rdnetdebug; then getarg quiet && DRACUT_QUIET="yes" mkfifo /dev/initlog.pipe /sbin/loginit $DRACUT_QUIET /dev/console 2>&1 & @@ -121,7 +121,7 @@ UDEVVERSION=$(udevadm --version) source_conf /etc/conf.d # run scriptlets to parse the command line -getarg 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" +getarg 'rd.break=cmdline' 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" source_all cmdline [ -z "$root" ] && die "No or empty root= argument" @@ -138,7 +138,7 @@ source_all cmdline } > /tmp/root.info # pre-udev scripts run before udev starts, and are run only once. -getarg 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" +getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" source_all pre-udev # start up udev and trigger cold plugs @@ -152,18 +152,18 @@ if [ $UDEVVERSION -lt 140 ]; then UDEV_QUEUE_EMPTY="udevadm settle --timeout=1" fi -getarg rdudevinfo && udevadm control $UDEV_LOG_PRIO_ARG=info -getarg rdudevdebug && udevadm control $UDEV_LOG_PRIO_ARG=debug +getargbool 0 rd.udev.info -y rdudevinfo && udevadm control $UDEV_LOG_PRIO_ARG=info +getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control $UDEV_LOG_PRIO_ARG=debug -getarg 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" +getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" source_all pre-trigger # then the rest udevadm trigger --action=add $udevtriggeropts >/dev/null 2>&1 -getarg 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" +getarg 'rd.break=initqueue' 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" -RDRETRY=$(getarg 'rd_retry=') +RDRETRY=$(getarg rd.retry 'rd_retry=') RDRETRY=${RDRETRY:-20} RDRETRY=$(($RDRETRY*2)) @@ -223,11 +223,11 @@ unset queuetriggered # pre-mount happens before we try to mount the root filesystem, # and happens once. -getarg 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" +getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" source_all pre-mount -getarg 'rdbreak=mount' && emergency_shell -n mount "Break mount" +getarg 'rd.break=mount' 'rdbreak=mount' && emergency_shell -n mount "Break mount" # 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. i=0 @@ -249,7 +249,7 @@ done } | vinfo # pre pivot scripts are sourced just before we switch over to the new root. -getarg 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" +getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" source_all pre-pivot # by the time we get here, the root filesystem should be mounted. @@ -264,7 +264,7 @@ done emergency_shell } -getarg rdbreak && emergency_shell -n switch_root "Break before switch_root" +getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root" # stop udev queue before killing it udevadm control --stop-exec-queue @@ -314,12 +314,12 @@ else fi # Debug: Copy state -if getarg rdcopystate; then +if getargbool 0 rd.copystate -y rdcopystate; then mkdir /dev/.initramfs/ cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1 fi -if getarg rd.timestamp; then +if getargbool 1 rd.timestamp; then export RDTIMESTAMP else unset RDTIMESTAMP diff --git a/modules.d/99base/parse-blacklist.sh b/modules.d/99base/parse-blacklist.sh index 7942772bb..ae8c5f0c2 100755 --- a/modules.d/99base/parse-blacklist.sh +++ b/modules.d/99base/parse-blacklist.sh @@ -2,6 +2,6 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -for p in $(getargs rdblacklist=); do +for p in $(getargs rd.module.blacklist rdblacklist=); do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf done diff --git a/test/TEST-10-RAID/hard-off.sh b/test/TEST-10-RAID/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-10-RAID/hard-off.sh +++ b/test/TEST-10-RAID/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index 159de9930..88c42c142 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -4,12 +4,12 @@ TEST_DESCRIPTION="root filesystem on an encrypted LVM PV on a RAID-5" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rdshell" +#DEBUGFAIL="rd.shell" test_run() { $testdir/run-qemu -hda root.ext2 -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \ + -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -initrd initramfs.testing grep -m 1 -q dracut-root-block-success root.ext2 || return 1 } diff --git a/test/TEST-11-LVM/hard-off.sh b/test/TEST-11-LVM/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-11-LVM/hard-off.sh +++ b/test/TEST-11-LVM/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh index 508ac5f4f..91b73e909 100755 --- a/test/TEST-11-LVM/test.sh +++ b/test/TEST-11-LVM/test.sh @@ -4,12 +4,12 @@ TEST_DESCRIPTION="root filesystem on LVM PV" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rdshell" +#DEBUGFAIL="rd.shell" test_run() { $testdir/run-qemu -hda root.ext2 -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \ + -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -initrd initramfs.testing grep -m 1 -q dracut-root-block-success root.ext2 || return 1 } diff --git a/test/TEST-12-RAID-DEG/hard-off.sh b/test/TEST-12-RAID-DEG/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-12-RAID-DEG/hard-off.sh +++ b/test/TEST-12-RAID-DEG/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh index fd1d4c055..8c657a1d8 100755 --- a/test/TEST-12-RAID-DEG/test.sh +++ b/test/TEST-12-RAID-DEG/test.sh @@ -4,13 +4,13 @@ TEST_DESCRIPTION="root filesystem on an encrypted LVM PV on a degraded RAID-5" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -DEBUGFAIL="rdshell" +DEBUGFAIL="rd.shell" client_run() { echo "CLIENT TEST START: $@" $testdir/run-qemu -hda root.ext2 -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "$@ root=LABEL=root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL " \ + -append "$@ root=LABEL=root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL " \ -initrd initramfs.testing if ! grep -m 1 -q dracut-root-block-success root.ext2; then echo "CLIENT TEST END: $@ [FAIL]" @@ -28,23 +28,23 @@ test_run() { client_run || return 1 -# client_run rd_NO_MDADMCONF || return 1 +# client_run rd.md.conf=0 || return 1 - client_run rd_NO_LVM failme && return 1 + client_run rd.lvm=0 failme && return 1 - client_run rd_LVM_VG=failme failme && return 1 + client_run rd.lvm.vg=failme failme && return 1 - client_run rd_LVM_VG=dracut || return 1 + client_run rd.lvm.vg=dracut || return 1 -# client_run rd_MD_UUID=$MD_UUID rd_NO_MDADMCONF || return 1 +# client_run rd.md.uuid=$MD_UUID rd.md.conf=0 || return 1 - client_run rd_LVM_VG=dummy1 rd_LVM_VG=dracut rd_LVM_VG=dummy2 rd_NO_LVMCONF failme && return 1 + client_run rd.lvm.vg=dummy1 rd.lvm.vg=dracut rd.lvm.vg=dummy2 rd.lvm.conf=0 failme && return 1 -# client_run rd_MD_UUID=failme rd_NO_MDADMCONF failme && return 1 +# client_run rd.md.uuid=failme rd.md.conf=0 failme && return 1 - client_run rd_NO_MD failme && return 1 + client_run rd.md=0 failme && return 1 -# client_run rd_MD_UUID=dummy1 rd_MD_UUID=$MD_UUID rd_MD_UUID=dummy2 rd_NO_MDADMCONF failme && return 1 +# client_run rd.md.uuid=dummy1 rd.md.uuid=$MD_UUID rd.md.uuid=dummy2 rd.md.conf=0 failme && return 1 return 0 } diff --git a/test/TEST-13-ENC-RAID-LVM/hard-off.sh b/test/TEST-13-ENC-RAID-LVM/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-13-ENC-RAID-LVM/hard-off.sh +++ b/test/TEST-13-ENC-RAID-LVM/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh index f149f2897..579641838 100755 --- a/test/TEST-13-ENC-RAID-LVM/test.sh +++ b/test/TEST-13-ENC-RAID-LVM/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on LVM on encrypted partitions of a RAID-5" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rdshell" # udev.log-priority=debug +#DEBUGFAIL="rd.shell" # udev.log-priority=debug test_run() { LUKSARGS=$(cat luks.txt) @@ -14,7 +14,7 @@ test_run() { echo "CLIENT TEST START: $LUKSARGS" $testdir/run-qemu -hda root.ext2 -hdb check-success.img -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $LUKSARGS $DEBUGFAIL" \ + -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $LUKSARGS $DEBUGFAIL" \ -initrd initramfs.testing grep -m 1 -q dracut-root-block-success check-success.img || return 1 echo "CLIENT TEST END: [OK]" @@ -24,7 +24,7 @@ test_run() { echo "CLIENT TEST START: Any LUKS" $testdir/run-qemu -hda root.ext2 -hdb check-success.img -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL" \ + -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -initrd initramfs.testing grep -m 1 -q dracut-root-block-success check-success.img || return 1 echo "CLIENT TEST END: [OK]" @@ -34,7 +34,7 @@ test_run() { echo "CLIENT TEST START: Wrong LUKS UUID" $testdir/run-qemu -hda root.ext2 -hdb check-success.img -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd_retry=3 rdinfo console=ttyS0,115200n81 selinux=0 rdinitdebug rdnetdebug $DEBUGFAIL rd_LUKS_UUID=failme" \ + -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ -initrd initramfs.testing grep -m 1 -q dracut-root-block-success check-success.img && return 1 echo "CLIENT TEST END: [OK]" @@ -89,7 +89,7 @@ test_setup() { cryptoUUIDS=$(grep --binary-files=text -m 3 ID_FS_UUID root.ext2) for uuid in $cryptoUUIDS; do eval $uuid - printf ' rd_LUKS_UUID=luks-%s ' $ID_FS_UUID + printf ' rd.luks.uuid=luks-%s ' $ID_FS_UUID done > luks.txt diff --git a/test/TEST-14-IMSM/hard-off.sh b/test/TEST-14-IMSM/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-14-IMSM/hard-off.sh +++ b/test/TEST-14-IMSM/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh index 360b08c95..047cf71de 100755 --- a/test/TEST-14-IMSM/test.sh +++ b/test/TEST-14-IMSM/test.sh @@ -4,14 +4,14 @@ TEST_DESCRIPTION="root filesystem on LVM PV on a isw dmraid" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -DEBUGFAIL="rdshell" +DEBUGFAIL="rd.shell" #DEBUGFAIL="$DEBUGFAIL udev.log-priority=debug" client_run() { echo "CLIENT TEST START: $@" $testdir/run-qemu -hda root.ext2 -hdb disk1 -hdc disk2 -m 256M -nographic \ -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "$@ root=LABEL=root rw quiet rd_retry=5 rdinitdebug console=ttyS0,115200n81 selinux=0 rdinfo $DEBUGFAIL" \ + -append "$@ root=LABEL=root rw quiet rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $DEBUGFAIL" \ -initrd initramfs.testing if ! grep -m 1 -q dracut-root-block-success root.ext2; then echo "CLIENT TEST END: $@ [FAIL]" @@ -24,15 +24,15 @@ client_run() { } test_run() { - client_run rd_NO_MDIMSM || return 1 + client_run rd.md.imsm || return 1 client_run || return 1 - client_run rd_NO_DM || return 1 + client_run rd.dm=0 || return 1 # This test succeeds, because the mirror parts are found without # assembling the mirror itsself, which is what we want - client_run rd_NO_MD rd_NO_MDIMSM failme && return 1 - client_run rd_NO_MD failme && return 1 + client_run rd.md=0 rd.md.imsm failme && return 1 + client_run rd.md=0 failme && return 1 # the following test hangs on newer md - #client_run rd_NO_DM rd_NO_MDIMSM rd_NO_MDADMCONF || return 1 + #client_run rd.dm=0 rd.md.imsm rd.md.conf=0 || return 1 return 0 } diff --git a/test/TEST-20-NFS/hard-off.sh b/test/TEST-20-NFS/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-20-NFS/hard-off.sh +++ b/test/TEST-20-NFS/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh index 24b909c61..455fda68d 100755 --- a/test/TEST-20-NFS/test.sh +++ b/test/TEST-20-NFS/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on NFS" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rdshell" +#DEBUGFAIL="rd.shell" run_server() { # Start server first @@ -46,7 +46,7 @@ client_test() { -net nic,macaddr=$mac,model=e1000 \ -net socket,connect=127.0.0.1:12345 \ -kernel /boot/vmlinuz-$KVERSION \ - -append "$cmdline $DEBUGFAIL rdinitdebug rd_retry=10 rdinfo quiet rdnetdebug ro console=ttyS0,115200n81 selinux=0" \ + -append "$cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ -initrd initramfs.testing if [[ $? -ne 0 ]] || ! grep -m 1 -q nfs-OK client.img; then diff --git a/test/TEST-30-ISCSI/hard-off.sh b/test/TEST-30-ISCSI/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-30-ISCSI/hard-off.sh +++ b/test/TEST-30-ISCSI/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh index a0b85c315..125901501 100755 --- a/test/TEST-30-ISCSI/test.sh +++ b/test/TEST-30-ISCSI/test.sh @@ -3,7 +3,7 @@ TEST_DESCRIPTION="root filesystem over iSCSI" KVERSION=${KVERSION-$(uname -r)} -#DEBUGFAIL="rdshell" +#DEBUGFAIL="rd.shell" run_server() { # Start server first @@ -38,7 +38,7 @@ run_client() { -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ -net socket,connect=127.0.0.1:12345 \ -kernel /boot/vmlinuz-$KVERSION \ - -append "root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:eth0:off netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2 rw quiet rd_retry=5 rdinitdebug rdinfo rdnetdebug console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -append "root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:eth0:off netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2 rw quiet rd.retry=5 rd.debug rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ -initrd initramfs.testing grep -m 1 -q iscsi-OK client.img || return 1 @@ -47,7 +47,7 @@ run_client() { -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ -net socket,connect=127.0.0.1:12345 \ -kernel /boot/vmlinuz-$KVERSION \ - -append "root=dhcp rw quiet rd_retry=5 rdinitdebug rdinfo rdnetdebug console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -append "root=dhcp rw quiet rd.retry=5 rd.debug rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ -initrd initramfs.testing grep -m 1 -q iscsi-OK client.img || return 1 diff --git a/test/TEST-40-NBD/hard-off.sh b/test/TEST-40-NBD/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-40-NBD/hard-off.sh +++ b/test/TEST-40-NBD/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh index ba68b48fa..9425427b4 100755 --- a/test/TEST-40-NBD/test.sh +++ b/test/TEST-40-NBD/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on NBD" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rdshell" +#DEBUGFAIL="rd.shell" run_server() { # Start server first @@ -50,7 +50,7 @@ client_test() { -net nic,macaddr=$mac,model=e1000 \ -net socket,connect=127.0.0.1:12345 \ -kernel /boot/vmlinuz-$KVERSION \ - -append "$cmdline $DEBUGFAIL rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0" \ + -append "$cmdline $DEBUGFAIL rd.debug rd.info ro quiet console=ttyS0,115200n81 selinux=0" \ -initrd initramfs.testing if [[ $? -ne 0 ]] || ! grep -m 1 -q nbd-OK flag.img; then diff --git a/test/TEST-50-MULTINIC/hard-off.sh b/test/TEST-50-MULTINIC/hard-off.sh index c96383215..12c3d5aca 100755 --- a/test/TEST-50-MULTINIC/hard-off.sh +++ b/test/TEST-50-MULTINIC/hard-off.sh @@ -1,3 +1,3 @@ #!/bin/sh -getarg rdshell || poweroff -f +getarg rd.shell || poweroff -f getarg failme && poweroff -f diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh index e07ef3b69..dd9e3b1ea 100755 --- a/test/TEST-50-MULTINIC/test.sh +++ b/test/TEST-50-MULTINIC/test.sh @@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on NFS with multiple nics" KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures -#DEBUGFAIL="rdshell" +#DEBUGFAIL="rd.shell" run_server() { # Start server first @@ -15,7 +15,7 @@ run_server() { -net socket,listen=127.0.0.1:12345 \ -serial udp:127.0.0.1:9999 \ -kernel /boot/vmlinuz-$KVERSION \ - -append "selinux=0 root=/dev/sda rdinitdebug rdinfo rdnetdebug rw quiet console=ttyS0,115200n81" \ + -append "selinux=0 root=/dev/sda rd.debug rd.info rw quiet console=ttyS0,115200n81" \ -initrd initramfs.server -pidfile server.pid -daemonize || return 1 sudo chmod 644 server.pid || return 1 @@ -51,7 +51,7 @@ client_test() { -drive if=ide,index=2,media=disk \ -drive if=ide,index=3,media=disk \ -kernel /boot/vmlinuz-$KVERSION \ - -append "$cmdline $DEBUGFAIL rd_retry=5 rdinitdebug rdinfo rdnetdebug ro quiet console=ttyS0,115200n81 selinux=0 rdcopystate" \ + -append "$cmdline $DEBUGFAIL rd.retry=5 rd.debug rd.info ro quiet console=ttyS0,115200n81 selinux=0 rd.copystate" \ -initrd initramfs.testing if [[ $? -ne 0 ]] || ! grep -m 1 -q OK client.img; then