From 3b403b32fc6ed2621c7a84b3ce16afa199fd43b0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 10 May 2011 11:39:10 +0200 Subject: [PATCH] removed trailing whitespaces --- HACKING | 6 +- NEWS | 64 +++++++++---------- README | 16 ++--- README.generic | 2 +- README.modules | 26 ++++---- dracut | 50 +++++++-------- dracut-catimages | 4 +- dracut-catimages.8.xml | 2 +- dracut-functions | 10 +-- dracut-gencmdline | 18 +++--- dracut-gencmdline.8.xml | 2 +- dracut.8.xml | 18 +++--- dracut.conf.5.xml | 4 +- dracut.kernel.7.xml | 34 +++++----- dracut.spec | 24 +++---- dracut.xml | 12 ++-- lsinitrd | 4 +- modules.d/00bootchart/module-setup.sh | 12 ++-- modules.d/01fips/module-setup.sh | 4 +- modules.d/02caps/caps.sh | 4 +- modules.d/10i18n/README | 2 +- modules.d/10i18n/module-setup.sh | 4 +- modules.d/40network/dhclient-script | 10 +-- modules.d/40network/dhclient.conf | 2 +- modules.d/40network/ifup | 16 ++--- modules.d/40network/module-setup.sh | 6 +- modules.d/40network/netroot | 14 ++-- modules.d/40network/parse-bond.sh | 4 +- modules.d/40network/parse-bridge.sh | 4 +- modules.d/40network/parse-ip-opts.sh | 4 +- modules.d/45ifcfg/write-ifcfg.sh | 16 ++--- modules.d/50gensplash/module-setup.sh | 2 +- modules.d/50plymouth/plymouth-populate-initrd | 6 +- modules.d/90crypt/crypt-lib.sh | 2 +- modules.d/90crypt/cryptroot-ask.sh | 2 +- modules.d/90crypt/module-setup.sh | 2 +- modules.d/90crypt/parse-crypt.sh | 4 +- modules.d/90dm/dm-pre-udev.sh | 2 +- modules.d/90dmraid/dmraid.sh | 6 +- modules.d/90dmraid/module-setup.sh | 6 +- .../90dmsquash-live/dmsquash-live-genrules.sh | 8 +-- modules.d/90dmsquash-live/module-setup.sh | 2 +- modules.d/90kernel-modules/insmodpost.sh | 4 +- modules.d/90kernel-modules/module-setup.sh | 2 +- modules.d/90kernel-modules/parse-kernel.sh | 12 ++-- modules.d/90lvm/lvm_scan.sh | 6 +- modules.d/90lvm/module-setup.sh | 6 +- .../90mdraid/65-md-incremental-imsm.rules | 4 +- modules.d/90mdraid/mdadm_auto.sh | 2 +- modules.d/90mdraid/mdraid-cleanup.sh | 4 +- modules.d/90mdraid/mdraid_start.sh | 2 +- modules.d/90mdraid/module-setup.sh | 12 ++-- modules.d/90mdraid/parse-md.sh | 8 +-- modules.d/90multipath/multipathd-stop.sh | 2 +- modules.d/90multipath/multipathd.sh | 2 +- modules.d/95dasd_mod/module-setup.sh | 2 +- modules.d/95debug/module-setup.sh | 2 +- modules.d/95fcoe/module-setup.sh | 4 +- modules.d/95iscsi/iscsiroot | 18 +++--- modules.d/95iscsi/module-setup.sh | 2 +- modules.d/95nbd/module-setup.sh | 2 +- modules.d/95nbd/parse-nbdroot.sh | 2 +- modules.d/95nfs/module-setup.sh | 6 +- modules.d/95nfs/nfsroot | 4 +- modules.d/95nfs/nfsroot-cleanup.sh | 2 +- modules.d/95nfs/parse-nfsroot.sh | 6 +- modules.d/95resume/module-setup.sh | 2 +- modules.d/95resume/parse-resume.sh | 2 +- modules.d/95resume/resume.sh | 2 +- modules.d/95rootfs-block/block-genrules.sh | 6 +- modules.d/95rootfs-block/mount-root.sh | 12 ++-- modules.d/95terminfo/module-setup.sh | 2 +- modules.d/95udev-rules/module-setup.sh | 6 +- modules.d/95zfcp/module-setup.sh | 4 +- modules.d/95zfcp/parse-zfcp.sh | 2 +- modules.d/95zfcp/zfcpconf.sh | 6 +- modules.d/95znet/module-setup.sh | 2 +- modules.d/98selinux/selinux-loadpolicy.sh | 8 +-- modules.d/98syslog/README | 10 +-- modules.d/98syslog/parse-syslog-opts.sh | 2 +- modules.d/98syslog/rsyslogd-start.sh | 4 +- modules.d/98syslog/syslog-genrules.sh | 2 +- modules.d/99base/dracut-lib.sh | 40 ++++++------ modules.d/99base/init | 34 +++++----- modules.d/99base/initqueue | 4 +- modules.d/99base/loginit | 4 +- modules.d/99base/module-setup.sh | 4 +- test/TEST-01-BASIC/create-root.sh | 6 +- test/TEST-01-BASIC/test.sh | 6 +- test/TEST-10-RAID/test.sh | 8 +-- test/TEST-11-LVM/test.sh | 8 +-- test/TEST-12-RAID-DEG/create-root.sh | 4 +- test/TEST-12-RAID-DEG/test.sh | 10 +-- test/TEST-13-ENC-RAID-LVM/create-root.sh | 4 +- test/TEST-13-ENC-RAID-LVM/test.sh | 12 ++-- test/TEST-14-IMSM/create-root.sh | 16 ++--- test/TEST-14-IMSM/test.sh | 8 +-- test/TEST-20-NFS/server-init | 2 +- test/TEST-20-NFS/test.sh | 4 +- test/TEST-30-ISCSI/server-init | 2 +- test/TEST-30-ISCSI/test.sh | 8 +-- test/TEST-40-NBD/server-init | 2 +- test/TEST-50-MULTINIC/server-init | 2 +- test/TEST-50-MULTINIC/test.sh | 2 +- test/test-functions | 8 +-- 105 files changed, 413 insertions(+), 413 deletions(-) diff --git a/HACKING b/HACKING index 97a80509..3c3a52da 100644 --- a/HACKING +++ b/HACKING @@ -1,11 +1,11 @@ Right now, most of the testing is done using a qemu/kvm guest and generating the initramfs on another box but the support is all present to build for the "running" machine. For the former, you can boot the guest -using qemu's -kernel and -initrd options. +using qemu's -kernel and -initrd options. dracut exists and will build an image. It is command-line equivalent to most mkinitrd implementations and should be pretty straight-forward -to use. +to use. To use, just run dracut with an output file name and, optionally, a kernel version (it defaults to using the current). The appropriate @@ -14,7 +14,7 @@ like to customize the list of modules copied in, edit /etc/dracut.conf and set dracutmodules="foo bar baz" -Note that dracut calls functional components in modules.d "modules" +Note that dracut calls functional components in modules.d "modules" while kernel modules are called "drivers". Requirements: diff --git a/NEWS b/NEWS index a814bbd7..47d5d2c0 100644 --- a/NEWS +++ b/NEWS @@ -67,7 +67,7 @@ dracut-006 - add btrfsctl scan for btrfs multi-devices (raid) - teach dmsquash live-root to use rootflags - trigger udev with action=add -- fixed add_drivers handling +- fixed add_drivers handling - add sr_mod - use pigz instead of gzip, if available - boot from LVM mirrors and snapshots @@ -80,7 +80,7 @@ dracut-006 dracut-005 ========== -- dcb support to dracut's FCoE support +- dcb support to dracut's FCoE support - add readonly overlay support for dmsquash - add keyboard kernel modules - dracut.conf: added add_dracutmodules @@ -118,7 +118,7 @@ dracut-003 - add s390 network support - fixed dracut-gencmdline for root=UUID or LABEL - do not destroy assembled raid arrays if mdadm.conf present -- mount /dev/shm +- mount /dev/shm - let udevd not resolve group and user names - moved network from udev to initqueue - improved debug output: specifying "rdinitdebug" now logs @@ -126,7 +126,7 @@ dracut-003 - strip kernel modules which have no x bit set - redirect stdin, stdout, stderr all RW to /dev/console so the user can use "less" to view /init.log and dmesg -- add new device mapper udev rules and dmeventd +- add new device mapper udev rules and dmeventd - fixed dracut-gencmdline for root=UUID or LABEL - do not destroy assembled raid arrays if mdadm.conf present - mount /dev/shm @@ -171,17 +171,17 @@ dracut-001 Supported cmdline formats: fcoe=: fcoe=: - + Note currently only nodcb is supported, the dcb option is reserved for future use. - + Note letters in the macaddress must be lowercase! - + Examples: fcoe=eth0:nodcb fcoe=4A:3F:4C:04:F8:D7:nodcb -- Syslog support for dracut +- Syslog support for dracut This module provides syslog functionality in the initrd. This is especially interesting when complex configuration being used to provide access to the device the rootfs resides on. @@ -208,20 +208,20 @@ dracut-0.8 dracut-0.7 ========== - dracut: strip binaries in initramfs - + --strip strip binaries in the initramfs (default) - + --nostrip do not strip binaries in the initramfs - dracut-catimages - + Usage: ./dracut-catimages [OPTION]... [...] Creates initial ramdisk image by concatenating several images from the command line and /boot/dracut/ - + -f, --force Overwrite existing initramfs file. -i, --imagedir Directory with additional images to add (default: /boot/dracut/) @@ -238,44 +238,44 @@ dracut-0.7 dracut-0.6 ========== - dracut: add --kernel-only and --no-kernel arguments - + --kernel-only only install kernel drivers and firmware files - + --no-kernel do not install kernel drivers and firmware files - + All kernel module related install commands moved from "install" to "installkernel". - + For "--kernel-only" all installkernel scripts of the specified modules are used, regardless of any checks, so that all modules which might be needed by any dracut generic image are in. - + The basic idea is to create two images. One image with the kernel modules and one without. So if the kernel changes, you only have to replace one image. - + Grub and the kernel can handle multiple images, so grub entry can look like this: - + title Fedora (2.6.29.5-191.fc11.i586) root (hd0,0) kernel /vmlinuz-2.6.29.5-191.fc11.i586 ro rhgb quiet initrd /initrd-20090722.img /initrd-kernel-2.6.29.5-191.fc11.i586.img /initrd-config.img - + initrd-20090722.img the image provided by the initrd rpm one old backup version is kept like with the kernel - + initrd-kernel-2.6.29.5-191.fc11.i586.img the image provided by the kernel rpm - + initrd-config.img optional image with local configuration files - dracut: add --kmoddir directory, where to look for kernel modules - + -k, --kmoddir [DIR] specify the directory, where to look for kernel modules @@ -295,18 +295,18 @@ dracut-0.4 - firmware loading support - new internal queue (initqueue) initqueue now loops until /dev/root exists or root is mounted - + init now has the following points to inject scripts: - + /cmdline/*.sh scripts for command line parsing - + /pre-udev/*.sh scripts to run before udev is started - + /pre-trigger/*.sh scripts to run before the main udev trigger is pulled - + /initqueue/*.sh runs in parallel to the udev trigger Udev events can add scripts here with /sbin/initqueue. @@ -318,12 +318,12 @@ dracut-0.4 filesystem was mounted, the user will be dropped to a shell after a timeout. Scripts can remove themselves from the initqueue by "rm $job". - + /pre-mount/*.sh scripts to run before the root filesystem is mounted NFS is an exception, because it has no device node to be created and mounts in the udev events - + /mount/*.sh scripts to mount the root filesystem NFS is an exception, because it has no device node to be created @@ -331,12 +331,12 @@ dracut-0.4 If the udev queue is empty and no root device is found or no root filesystem was mounted, the user will be dropped to a shell after a timeout. - + /pre-pivot/*.sh scripts to run before the real init is executed and the initramfs disappears All processes started before should be killed here. - + The behaviour of the dmraid module demonstrates how to use the new mechanism. If it detects a device which is part of a raidmember from a udev rule, it installs a job to scan for dmraid devices, if the udev diff --git a/README b/README index ab7cba96..a62fa7bd 100644 --- a/README +++ b/README @@ -2,8 +2,8 @@ Dracut ------ Dracut is a new initramfs infrastructure. -Information about the initial goals and aims can be found at -https://fedoraproject.org/wiki/Initrdrewrite +Information about the initial goals and aims can be found at +https://fedoraproject.org/wiki/Initrdrewrite Unlike existing initramfs's, this is an attempt at having as little as possible hard-coded into the initramfs as possible. The initramfs has @@ -21,8 +21,8 @@ as hooks are guaranteed to be the path to slow-down. Most of the initrd generation functionality in dracut is provided by a bunch of generator modules that are sourced by the main dracut script to install -specific functionality into the initrd. They live in the modules.d -subdirectory, and use functionality provided by dracut-functions to do their +specific functionality into the initrd. They live in the modules.d +subdirectory, and use functionality provided by dracut-functions to do their work. Some general rules for writing modules: @@ -44,7 +44,7 @@ Some general rules for writing modules: * We have some breakpoints for debugging your hooks. If you pass 'rdbreak' as a kernel parameter, the initramfs will drop to a shell just before switching to a new root. You can pass 'rdbreak=hookpoint', and the initramfs - will break just before hooks in that hookpoint run. + will break just before hooks in that hookpoint run. Also, there is an attempt to keep things as distribution-agnostic as possible. Every distribution has their own tool here and it's not @@ -56,7 +56,7 @@ Currently dracut lives on sourceforge. Project Page: https://sourceforge.net/projects/dracut/ -Drop Harald Hoyer a mail, if you want to help with +Drop Harald Hoyer a mail, if you want to help with the documentation, git access, etc. Git Repository: @@ -64,7 +64,7 @@ http://dracut.git.sourceforge.net/ git://dracut.git.sourceforge.net/gitroot/dracut/dracut Trac Instance: -http://apps.sourceforge.net/trac/dracut/ +http://apps.sourceforge.net/trac/dracut/ The git tree can be found at git://dracut.git.sourceforge.net/gitroot/dracut/dracut for now. See the TODO @@ -72,7 +72,7 @@ file for things which still need to be done and HACKING for some instructions on how to get started. There is also a mailing list that is being used for the discussion -- initramfs@vger.kernel.org. It is a typical vger list, send mail to majordomo@vger.kernel.org with body -of 'subscribe initramfs email@host.com' +of 'subscribe initramfs email@host.com' Licensed under the GPLv2 diff --git a/README.generic b/README.generic index 780e0bdc..58889ac3 100644 --- a/README.generic +++ b/README.generic @@ -1,7 +1,7 @@ To build a generic initramfs, you have to install the following software packages: * device-mapper * cryptsetup-luks - * rpcbind nfs-utils + * rpcbind nfs-utils * lvm2 * iscsi-initiator-utils * nbd diff --git a/README.modules b/README.modules index 65915f5e..21461de3 100644 --- a/README.modules +++ b/README.modules @@ -12,20 +12,20 @@ dracut_install_dir/modules.d/ The numeric code must be present and in the range of 00 - 99. Modules with lower numbers are installed first. This is important because the dracut install functions (which install files onto - the initrd) refuse to overwrite already installed files. This makes - it easy for an earlier module to override the functionality of a + the initrd) refuse to overwrite already installed files. This makes + it easy for an earlier module to override the functionality of a later module, so that you can have a distro or system specific module override or modify the functionality of a generic module without having to patch the more generic module. module-setup.sh: - dracut sources this script to install the functionality that a + dracut sources this script to install the functionality that a module implements onto the initrd. For the most part, this amounts to copying files from the host system onto the initrd in a controlled - manner. + manner. install(): - This function of module-setup.sh is called to install all + This function of module-setup.sh is called to install all non-kernel files. dracut supplies several install functions that are specialized for different file types. Browse through dracut-functions fore more details. dracut also provides a $moddir variable if you @@ -33,21 +33,21 @@ install(): hook, a udev rule, or a specialized executable. installkernel(): - This function of module-setup.sh is called to install all + This function of module-setup.sh is called to install all kernel related files. -check(): +check(): Dracut calls this function to check and see if a module can be installed on the initrd. - + When called without options, check should check to make sure that any files it needs to install into the initrd from the host system are present. It should exit with a 0 if they are, and a 1 if they are not. - When called with $hostonly set, it should perform the same check - that it would without it set, and it should also check to see if the + When called with $hostonly set, it should perform the same check + that it would without it set, and it should also check to see if the functionality the module implements is being used on the host system. For example, if this module handles installing support for LUKS encrypted volumes, it should return 0 if all the tools to handle @@ -60,7 +60,7 @@ depends(): which rely on the network module to detect and configure network interfaces. -Any other files in the module will not be touched by dracut directly. +Any other files in the module will not be touched by dracut directly. You are encouraged to provide a README that describes what the module is for. @@ -84,7 +84,7 @@ init has the following hook points to inject scripts: Udev events can add scripts here with /sbin/initqueue. If /sbin/initqueue is called with the "--onetime" option, the script will be removed after it was run. - If /lib/dracut/hooks/initqueue/work is created and udev >= 143 then + If /lib/dracut/hooks/initqueue/work is created and udev >= 143 then this loop can process the jobs in parallel to the udevtrigger. If the udev queue is empty and no root device is found or no root filesystem was mounted, the user will be dropped to a shell after @@ -93,7 +93,7 @@ init has the following hook points to inject scripts: /lib/dracut/hooks/pre-mount/*.sh scripts to run before the root filesystem is mounted - Network filesystems like NFS that do not use device files are an + Network filesystems like NFS that do not use device files are an exception. Root can be mounted already at this point. /lib/dracut/hooks/mount/*.sh diff --git a/dracut b/dracut index d2952882..d19c162d 100755 --- a/dracut +++ b/dracut @@ -1,7 +1,7 @@ #!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -# +# # Generator script for a dracut initramfs # Tries to retain some degree of compatibility with the command line # of the various mkinitrd implementations out there @@ -40,14 +40,14 @@ Creates initial ramdisk images for preloading modules -a, --add [LIST] Add a space-separated list of dracut modules. -d, --drivers [LIST] Specify a space-separated list of kernel modules to exclusively include in the initramfs. - --add-drivers [LIST] Specify a space-separated list of kernel + --add-drivers [LIST] Specify a space-separated list of kernel modules to add to the initramfs. --filesystems [LIST] Specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. - -k, --kmoddir [DIR] Specify the directory, where to look for kernel + -k, --kmoddir [DIR] Specify the directory, where to look for kernel modules - --fwdir [DIR] Specify additional directories, where to look for + --fwdir [DIR] Specify additional directories, where to look for firmwares, separated by : --kernel-only Only install kernel drivers and firmware files --no-kernel Do not install kernel drivers and firmware files @@ -73,7 +73,7 @@ Creates initial ramdisk images for preloading modules -q, --quiet Decrease verbosity level (default is info(4)) -c, --conf [FILE] Specify configuration file to use. Default: /etc/dracut.conf - --confdir [DIR] Specify configuration directory to use *.conf files + --confdir [DIR] Specify configuration directory to use *.conf files from. Default: /etc/dracut.conf.d -l, --local Local mode. Use modules from the current working directory instead of the system-wide installed in @@ -85,7 +85,7 @@ Creates initial ramdisk images for preloading modules -i, --include [SOURCE] [TARGET] Include the files in the SOURCE directory into the Target directory in the final initramfs. - If SOURCE is a file, it will be installed to TARGET + If SOURCE is a file, it will be installed to TARGET in the final initramfs. -I, --install [LIST] Install the space separated list of files into the initramfs. @@ -96,14 +96,14 @@ Creates initial ramdisk images for preloading modules Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot. --lzma Compress the generated initramfs using lzma. - Make sure your kernel has lzma support compiled in, + Make sure your kernel has lzma support compiled in, otherwise you will not be able to boot. --xz Compress the generated initramfs using xz. Make sure that your kernel has xz support compiled in, otherwise you will not be able to boot. --compress [COMPRESSION] Compress the generated initramfs with the passed compression program. Make sure your kernel - knows how to decompress the generated initramfs, + knows how to decompress the generated initramfs, otherwise you will not be able to boot. --no-compress Do not compress the generated initramfs. This will override any other compression options. @@ -137,7 +137,7 @@ push() { # val=$(pop stack) pop() { local __stack=$1; shift - local __resultvar=$1 + local __resultvar=$1 local myresult; # check for empty stack eval '[[ ${#'${__stack}'[@]} -eq 0 ]] && return 1' @@ -241,7 +241,7 @@ while (($# > 0)); do show_modules_l="yes" ;; -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;; - *) + *) if ! [[ ${outfile+x} ]]; then outfile=$1 elif ! [[ ${kernel+x} ]]; then @@ -261,7 +261,7 @@ fi PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH -[[ $debug ]] && { +[[ $debug ]] && { export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): '; set -x } @@ -269,7 +269,7 @@ export PATH [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut [[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions" ]] && \ - dracutbasedir="$(readlink -f ${0%/*})" + dracutbasedir="$(readlink -f ${0%/*})" # if we were not passed a config file, try the default one if [[ ! -f $conffile ]]; then @@ -287,7 +287,7 @@ fi # source our config dir if [[ $confdir && -d $confdir ]]; then - for f in "$confdir"/*.conf; do + for f in "$confdir"/*.conf; do [[ -e $f ]] && . "$f" done fi @@ -455,9 +455,9 @@ fi readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX) # clean up after ourselves no matter how we die. -trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT +trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT # clean up after ourselves no matter how we die. -trap 'exit 1;' SIGINT +trap 'exit 1;' SIGINT # Need to be able to have non-root users read stuff (rpcbind etc) chmod 755 "$initdir" @@ -476,14 +476,14 @@ mkdir -m 0755 -p "${initdir}${prefix}/lib" [[ $prefix ]] && ln -sfn "${prefix#/}/lib" "$initdir/lib" if [[ $kernel_only != yes ]]; then - for d in bin etc lib "$libdir" sbin tmp usr var; do + for d in bin etc lib "$libdir" sbin tmp usr var; do [[ -e "${initdir}${prefix}/$d" ]] && continue mkdir -m 0755 -p "${initdir}${prefix}/$d" [[ $prefix ]] && ln -sfn "${prefix#/}/${d#/}" "$initdir/$d" - done + done - for d in proc sys sysroot root run run/lock run/initramfs; do - mkdir -m 0755 -p "$initdir/$d"; + for d in proc sys sysroot root run run/lock run/initramfs; do + mkdir -m 0755 -p "$initdir/$d"; done ln -sfn /run "$initdir/var/run" @@ -529,7 +529,7 @@ while pop include_src src && pop include_target tgt; do if [[ -f $src ]]; then inst $src $tgt else - ddebug "Including directory: $src" + ddebug "Including directory: $src" mkdir -p "${initdir}/${tgt}" # check for preexisting symlinks, so we can cope with the # symlinks to $prefix @@ -544,7 +544,7 @@ while pop include_src src && pop include_target tgt; do cp -a -t "$s" "$i"/* else cp -a -t "$s" "$i" - fi + fi done fi fi @@ -577,9 +577,9 @@ if (($maxloglvl >= 5)); then du -c "$initdir" | sort -n | ddebug fi -# strip binaries +# strip binaries if [[ $do_strip = yes ]] ; then - for p in strip grep find; do + for p in strip grep find; do if ! type -P $p >/dev/null; then derror "Could not find '$p'. You should run $0 with '--nostrip'." do_strip=no @@ -610,10 +610,10 @@ if strstr "$modules_loaded" " fips " && command -v prelink >/dev/null; then fi if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet | \ - $compress > "$outfile"; ); then + $compress > "$outfile"; ); then dfatal "dracut: creation of $outfile failed" exit 1 -fi +fi dinfo "Wrote $outfile:" dinfo "$(ls -l "$outfile")" diff --git a/dracut-catimages b/dracut-catimages index 88c404d9..7ede1f73 100755 --- a/dracut-catimages +++ b/dracut-catimages @@ -39,7 +39,7 @@ Creates initial ramdisk image by concatenating several images from the command line and /boot/dracut/ -f, --force Overwrite existing initramfs file. - -i, --imagedir Directory with additional images to add + -i, --imagedir Directory with additional images to add (default: /boot/dracut/) -o, --overlaydir Overlay directory, which contains files that will be used to create an additional image @@ -120,7 +120,7 @@ images+=($@) dinfo "Using base image $baseimage" cat "$baseimage" > "$outfile" -for i in "${images[@]}"; do +for i in "${images[@]}"; do dinfo "Appending $i" cat "$i" >> "$outfile" done diff --git a/dracut-catimages.8.xml b/dracut-catimages.8.xml index b8f6714b..59f6dab4 100644 --- a/dracut-catimages.8.xml +++ b/dracut-catimages.8.xml @@ -67,7 +67,7 @@ line and /boot/dracut/*.img , -display help text and exit. +display help text and exit. diff --git a/dracut-functions b/dracut-functions index e1c22f18..41187e00 100755 --- a/dracut-functions +++ b/dracut-functions @@ -253,7 +253,7 @@ inst_simple() { if [[ -e "${src%/*}/.${src##*/}.hmac" ]]; then inst "${src%/*}/.${src##*/}.hmac" "${target%/*}/.${target##*/}.hmac" fi - ddebug "Installing $src" + ddebug "Installing $src" cp -pfL "$src" "${initdir}$target" } @@ -409,17 +409,17 @@ inst_rules() { inst_dir "/lib/udev/rules.d" inst_dir "$target" - for rule in "$@"; do + for rule in "$@"; do for r in /lib/udev/rules.d /etc/udev/rules.d; do if [[ -f $r/$rule ]]; then found="$r/$rule" inst_simple "$found" fi - done + done for r in '' ./ $dracutbasedir/rules.d/; do if [[ -f ${r}$rule ]]; then found="${r}$rule" - inst_simple "$found" "$target/${found##*/}" + inst_simple "$found" "$target/${found##*/}" fi done [[ $found ]] || dinfo "Skipping udev rule: $rule" @@ -459,7 +459,7 @@ inst_hook() { dfatal "Aborting initrd creation." exit 1 elif ! strstr "$hookdirs" "$1"; then - dfatal "No such hook type $1. Aborting initrd creation." + dfatal "No such hook type $1. Aborting initrd creation." exit 1 fi inst_simple "$3" "/lib/dracut/hooks/${1}/${2}${3##*/}" diff --git a/dracut-gencmdline b/dracut-gencmdline index 90e49065..c909e27b 100755 --- a/dracut-gencmdline +++ b/dracut-gencmdline @@ -168,7 +168,7 @@ resolve_device_name() { real=$(freadlink /dev/disk/by-label/${1##LABEL=}) [ -b $real ] && { echo $real; return; } fi - echo "$1" + echo "$1" } finddevnoinsys() { @@ -308,7 +308,7 @@ iscsi_set_parameters() { chap=${result} if [ -n "${chap}" -a "${chap}" != "" ]; then chap="-u ${chap}" - iscsi_get_rec_val $tmpfile "node.session.auth.password" + iscsi_get_rec_val $tmpfile "node.session.auth.password" chap_pw="-w ${result}" else chap="" @@ -318,7 +318,7 @@ iscsi_set_parameters() { chap_in=${result} if [ -n "${chap_in}" -a "${chap_in}" != "" ]; then chap_in="-U ${chap_in}" - iscsi_get_rec_val $tmpfile "node.session.auth.password_in" + iscsi_get_rec_val $tmpfile "node.session.auth.password_in" chap_in_pw="-W ${result}" else chap_in="" @@ -343,7 +343,7 @@ is_iscsi() { path=$1 if echo $path | grep -q "/platform/host[0-9]*/session[0-9]*/target[0-9]*:[0-9]*:[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*"; then return 0 - else + else return 1 fi } @@ -399,7 +399,7 @@ handledm() { EOF local name=$(dmsetup info --noheadings -c -j $major -m $minor -o name) local vg=$(lvshow "/dev/mapper/$name") - local raids=$(/sbin/dmraid -s -craidname 2>/dev/null | grep -vi "no raid disks") + local raids=$(/sbin/dmraid -s -craidname 2>/dev/null | grep -vi "no raid disks") if [ -n "$vg" ]; then vg=`echo $vg` # strip whitespace case " $vg_list " in @@ -630,7 +630,7 @@ fi cemit() { - cat + cat } emit() @@ -640,7 +640,7 @@ emit() NONL="-n" shift fi - echo $NONL "$@" + echo $NONL "$@" } emitdmraids() @@ -678,8 +678,8 @@ else echo -n "rd_NO_MD " fi -if [ -z "$nolvm" -a -n "$vg_list" ]; then - for vg in $vg_list; do +if [ -z "$nolvm" -a -n "$vg_list" ]; then + for vg in $vg_list; do echo -n "rd_LVM_VG=$vg " done else diff --git a/dracut-gencmdline.8.xml b/dracut-gencmdline.8.xml index b11a552a..dcda1eb4 100644 --- a/dracut-gencmdline.8.xml +++ b/dracut-gencmdline.8.xml @@ -15,7 +15,7 @@ - dracut-gencmdline + dracut-gencmdline diff --git a/dracut.8.xml b/dracut.8.xml index 4663d70b..9d440536 100644 --- a/dracut.8.xml +++ b/dracut.8.xml @@ -108,9 +108,9 @@ For a complete list of kernel command line options see - specify a space-separated list of dracut modules to call -when building the initramfs. -Modules are located in + specify a space-separated list of dracut modules to call +when building the initramfs. +Modules are located in /usr/share/dracut/modules.d. This parameter can be specified multiple times. @@ -163,7 +163,7 @@ The kernel modules have to be specified without the ".ko" suffix. This - specify a space-separated list of kernel filesystem modules to exclusively + specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. This parameter can be specified multiple times. @@ -300,7 +300,7 @@ include in the generic initramfs. This parameter can be specified multiple times specify configuration file to use. -Default: +Default: /etc/dracut.conf @@ -310,7 +310,7 @@ Default: specify configuration directory to use. -Default: +Default: /etc/dracut.conf.d @@ -336,8 +336,8 @@ This is useful when running dracut from a git checkout. - Host-Only mode: Install only what is needed for booting -the local host instead of a generic host. + Host-Only mode: Install only what is needed for booting +the local host instead of a generic host. If chrooted to another root other than the real root device, use "--fstab" and provide a valid /etc/fstab. @@ -505,7 +505,7 @@ TARGET directory in the final initramfs. If SOURCE is a file, it will be install Any files found in /etc/conf.d/ will be sourced in the initramfs to -set initial values. Command line options will override these values +set initial values. Command line options will override these values set in the configuration files. diff --git a/dracut.conf.5.xml b/dracut.conf.5.xml index c47e8247..697e6550 100644 --- a/dracut.conf.5.xml +++ b/dracut.conf.5.xml @@ -79,7 +79,7 @@ The kernel modules have to be specified without the ".ko" suffix.add_drivers+=" <kernel modules> " - Specify a space-separated list of kernel + Specify a space-separated list of kernel modules to add to the initramfs. The kernel modules have to be specified without the ".ko" suffix. @@ -123,7 +123,7 @@ initramfs. hostonly="{yes|no}" - Host-Only mode: Install only what is needed for booting + Host-Only mode: Install only what is needed for booting the local host instead of a generic host. If chrooted to another root other than the real root device, use and provide a valid /etc/fstab. diff --git a/dracut.kernel.7.xml b/dracut.kernel.7.xml index 445af992..1de4df19 100644 --- a/dracut.kernel.7.xml +++ b/dracut.kernel.7.xml @@ -25,11 +25,11 @@ Description The root filesystem used by the kernel is specified in the boot configuration -file, as always. The traditional root=/dev/hda1 style device +file, as always. The traditional root=/dev/hda1 style device specification is allowed. If a label is used, as in root=LABEL=rootPart the initramfs will search all available devices for an ext2 or ext3 filesystem with the appropriate label, and mount that device as the root filesystem. -root=UUID=uuidnumber will mount the partition with that UUID as the +root=UUID=uuidnumber will mount the partition with that UUID as the root filesystem. Standard @@ -47,7 +47,7 @@ root filesystem. root=<path to blockdevice> - specify blockdevice to use as root filesystem. + specify blockdevice to use as root filesystem. e.g.: root=/dev/sda1 root=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 @@ -66,14 +66,14 @@ root=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 specify additional mount options for the root filesystem. If not set, /etc/fstab -of the real root will be parsed for special mount options and mounted +of the real root will be parsed for special mount options and mounted accordingly. rd.fstab=0 - do not honor special mount options for the root filesystem found in + do not honor special mount options for the root filesystem found in /etc/fstab of the real root. @@ -294,7 +294,7 @@ This parameter can be specified multiple times. only activate the LUKS partitions with the given UUID Any "luks-" of the LUKS UUID is removed before comparing to <luks uuid>. -The comparisons also matches, if <luks uuid> is only the beginning of the +The comparisons also matches, if <luks uuid> is only the beginning of the LUKS UUID, so you don't have to specify the full UUID. This parameter can be specified multiple times. @@ -420,8 +420,8 @@ e.g. ip={dhcp|on|any|dhcp6|auto6|ibft} - dhcp|on|any: get ip from dhcp server from all interfaces. If root=dhcp, -loop sequentially through all interfaces (eth0, eth1, ...) and use the first + dhcp|on|any: get ip from dhcp server from all interfaces. If root=dhcp, +loop sequentially through all interfaces (eth0, eth1, ...) and use the first with a valid DHCP root-path. auto6: IPv6 autoconfiguration dhcp6: IPv6 DHCP @@ -459,7 +459,7 @@ This parameter can be specified multiple times. bootdev=<interface> - specify network interface to use routing and netroot information from. + specify network interface to use routing and netroot information from. Required if multiple ip= lines are used. @@ -501,7 +501,7 @@ NFS options can be appended with the prefix ":" or "," and a root={dhcp|dhcp6} - root=dhcp alone directs initrd to look at the DHCP root-path where NFS + root=dhcp alone directs initrd to look at the DHCP root-path where NFS options can be specified. root-path=<server-ip>:<root-dir>[,<nfs-options>] root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>] @@ -514,8 +514,8 @@ options can be specified. nfsroot=<server-ip>:<root-dir>:<nfs-options> - Deprecated! kernel Documentation/filesystems/nfsroot.txt defines -this method. + Deprecated! kernel Documentation/filesystems/nfsroot.txt defines +this method. This is supported by dracut, but not recommended. @@ -553,7 +553,7 @@ then used in the Discovery Service stage in conjunction with other associated fields. See http://tools.ietf.org/html/rfc4173. e.g.:root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 - If servername is an IPv6 address, it has to be put in brackets. e.g.: + If servername is an IPv6 address, it has to be put in brackets. e.g.: root=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0 @@ -568,7 +568,7 @@ associated fields. <LUN> :<targetname> ... - multiple netroot options allow setting up multiple iscsi disks. e.g.: + multiple netroot options allow setting up multiple iscsi disks. e.g.: root=UUID=12424547 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 @@ -631,9 +631,9 @@ For the second argument, currently only nodcb is supported. This parameter can b with dhcp root-path=nbd:<server>:<port>[:<fstype>][:<mountopts>] -root=dhcp alone directs initrd to look at the DHCP root-path where NBD +root=dhcp alone directs initrd to look at the DHCP root-path where NBD options can be specified. -This syntax is only usable in cases where you are directly mounting the volume +This syntax is only usable in cases where you are directly mounting the volume as the rootfs. @@ -1215,7 +1215,7 @@ rd.znet=ctc,0.0.0600,0.0.0601,0.0.0602,protocol=bar Any files found in /etc/conf.d/ will be sourced in the initramfs to -set initial values. Command line options will override these values +set initial values. Command line options will override these values set in the configuration files. diff --git a/dracut.spec b/dracut.spec index 31e706c5..5c8947bd 100644 --- a/dracut.spec +++ b/dracut.spec @@ -20,14 +20,14 @@ Release: %{release_prefix} Summary: Initramfs generator using udev %if 0%{?fedora} -Group: System Environment/Base +Group: System Environment/Base %endif %if 0%{?suse_version} Group: System/Base %endif -License: GPLv2+ +License: GPLv2+ URL: https://dracut.wiki.kernel.org/ -# Source can be generated by +# Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{?dashgittag};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}%{?dashgittag}.tar.bz2 @@ -93,16 +93,16 @@ Requires: util-linux >= 2.16 %description -Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. -Unlike existing implementations, dracut does hard-code as little as possible -into the initramfs. Dracut contains various modules which are driven by the -event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as +Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. +Unlike existing implementations, dracut does hard-code as little as possible +into the initramfs. Dracut contains various modules which are driven by the +event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network package. %package network Summary: Dracut modules to build a dracut initramfs with network support Requires: %{name} = %{version}-%{release} -Requires: rpcbind +Requires: rpcbind %if %{with_nbd} Requires: nbd %endif @@ -111,7 +111,7 @@ Requires: bridge-utils %if 0%{?fedora} Requires: iscsi-initiator-utils -Requires: nfs-utils +Requires: nfs-utils Requires: dhclient %endif @@ -165,14 +165,14 @@ This package contains tools to assemble the local initrd and host configuration. %setup -q -n %{name}-%{version}%{?dashgittag} %build -make +make %install %if 0%{?fedora} rm -rf $RPM_BUILD_ROOT %endif make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \ - sysconfdir=/etc mandir=%{_mandir} + sysconfdir=/etc mandir=%{_mandir} echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version @@ -285,7 +285,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,0755) %{_datadir}/dracut/modules.d/02caps -%files tools +%files tools %defattr(-,root,root,0755) %{_mandir}/man8/dracut-gencmdline.8* %{_mandir}/man8/dracut-catimages.8* diff --git a/dracut.xml b/dracut.xml index 4f71de54..ac78e83b 100644 --- a/dracut.xml +++ b/dracut.xml @@ -74,7 +74,7 @@ A TFTP server (on systems that can boot from Ethernet) - The bootloader will load the kernel and initial root file system image into memory and then start the kernel, passing in the memory address of the image. + The bootloader will load the kernel and initial root file system image into memory and then start the kernel, passing in the memory address of the image. Depending on which algorithms were compiled statically into it, the kernel can currently unpack initrd/initramfs images compressed with gzip, bzip2 and LZMA. @@ -431,7 +431,7 @@ title Fedora (2.6.29.5-191.fc11.x86_64) Remove the boot arguments ''rhgb'' and ''quiet'' -A sample /etc/grub.conf bootloader configuration file is listed below. +A sample /etc/grub.conf bootloader configuration file is listed below. default=0 timeout=5 @@ -439,12 +439,12 @@ 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 rd.shell + 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 If system boot fails, you will be dropped into a shell as seen in the example below. -No root device found +No root device found Dropping to debug shell. sh: can't access tty; job control turned off @@ -623,7 +623,7 @@ Common used functions are in dracut-lib.sh, which can be so inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh 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 rd.driver.post=); do + for p in $(getargs rd.driver.post=); do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf _do_insmodpost=1 done @@ -635,7 +635,7 @@ unset _do_insmodpost insmodpost.sh: . /lib/dracut-lib.sh -for p in $(getargs rd.driver.post=); do +for p in $(getargs rd.driver.post=); do modprobe $p done diff --git a/lsinitrd b/lsinitrd index 0d92bcce..de038fad 100755 --- a/lsinitrd +++ b/lsinitrd @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh # @@ -41,7 +41,7 @@ fi echo "$image:" echo "========================================================================" -$CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null +$CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null echo "========================================================================" $CAT "$image" | cpio --extract --verbose --quiet --list echo "========================================================================" diff --git a/modules.d/00bootchart/module-setup.sh b/modules.d/00bootchart/module-setup.sh index b58ce355..bf71b14b 100755 --- a/modules.d/00bootchart/module-setup.sh +++ b/modules.d/00bootchart/module-setup.sh @@ -12,16 +12,16 @@ depends() { } install() { - inst /sbin/bootchartd - inst /bin/bash + inst /sbin/bootchartd + inst /bin/bash inst_symlink /init /sbin/init inst_dir /lib/bootchart/tmpfs - inst /lib/bootchart/bootchart-collector - inst /etc/bootchartd.conf - inst /sbin/accton + inst /lib/bootchart/bootchart-collector + inst /etc/bootchartd.conf + inst /sbin/accton inst /usr/bin/pkill /bin/pkill inst /bin/echo - inst /bin/grep + inst /bin/grep inst /bin/usleep inst /usr/bin/[ /bin/[ diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh index 10199fee..f038c73a 100755 --- a/modules.d/01fips/module-setup.sh +++ b/modules.d/01fips/module-setup.sh @@ -13,11 +13,11 @@ depends() { installkernel() { FIPSMODULES="aead aes_generici aes-xts aes-x86_64 ansi_cprng cbc ccm chainiv ctr" FIPSMODULES="$FIPSMODULES des deflate ecb eseqiv hmac seqiv sha256 sha512" - FIPSMODULES="$FIPSMODULES cryptomgr crypto_null tcrypt" + FIPSMODULES="$FIPSMODULES cryptomgr crypto_null tcrypt" mkdir -m 0755 -p "${initdir}/etc/modprobe.d" - for mod in $FIPSMODULES; do + for mod in $FIPSMODULES; do if instmods $mod; then echo $mod >> "${initdir}/etc/fipsmodules" echo "blacklist $mod" >> "${initdir}/etc/modprobe.d/fips.conf" diff --git a/modules.d/02caps/caps.sh b/modules.d/02caps/caps.sh index 1732b709..6a8fe5d9 100755 --- a/modules.d/02caps/caps.sh +++ b/modules.d/02caps/caps.sh @@ -12,7 +12,7 @@ if [ "$capsmode" = "1" ]; then info "Loading CAPS_MODULES $CAPS_MODULES" for i in $CAPS_MODULES;do modprobe $i 2>&1 >/dev/null | vinfo; done - + if [ "$CAPS_MODULES_DISABLED" = "1" -a -e /proc/sys/kernel/modules_disabled ]; then info "Disabling module loading." echo $CAPS_MODULES_DISABLED > /proc/sys/kernel/modules_disabled @@ -29,7 +29,7 @@ if [ "$capsmode" = "1" ]; then echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/bset echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/inheritable fi - + echo "CAPS_INIT_DROP=\"$CAPS_INIT_DROP\"" > /etc/capsdrop info "Will drop capabilities $CAPS_INIT_DROP from init." fi diff --git a/modules.d/10i18n/README b/modules.d/10i18n/README index b2204cdb..0507a479 100644 --- a/modules.d/10i18n/README +++ b/modules.d/10i18n/README @@ -23,7 +23,7 @@ distributions. To deal with it avoiding hardcoding those differences in the installation script we handle it by mappings between variables used by Dracut and the ones in the system. Package maintainer is expected to create those for his/her distribution and it's appreciated to share it -with us, so we can include it in source package. +with us, so we can include it in source package. 1. Hostonly vs Generic diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh index f2320c3e..5b61f94d 100755 --- a/modules.d/10i18n/module-setup.sh +++ b/modules.d/10i18n/module-setup.sh @@ -178,12 +178,12 @@ install() { for kbddir in ${kbddir} /usr/lib/kbd /lib/kbd /usr/share /usr/share/kbd do [[ -d "${kbddir}" ]] && \ - for dir in ${KBDSUBDIRS//,/ } + for dir in ${KBDSUBDIRS//,/ } do [[ -d "${kbddir}/${dir}" ]] && continue false done && break - kbddir='' + kbddir='' done [[ ${kbddir} ]] || { diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script index f9a0103a..2c26838f 100755 --- a/modules.d/40network/dhclient-script +++ b/modules.d/40network/dhclient-script @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh @@ -37,7 +37,7 @@ setup_interface() { [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf if [ -n "$namesrv" ] ; then for s in $namesrv; do - echo nameserver $s + echo nameserver $s done fi >> /tmp/net.$netif.resolv.conf @@ -68,13 +68,13 @@ case $reason in warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" exit 1 fi - setup_interface + setup_interface set | while read line; do [ "${line#new_}" = "$line" ] && continue - echo "$line" + echo "$line" done >/tmp/dhclient.$netif.dhcpopts echo online > /sys/class/net/$netif/uevent - initqueue --onetime --name netroot-$netif netroot $netif + initqueue --onetime --name netroot-$netif netroot $netif ;; *) echo "dhcp: $reason";; esac diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf index 9a1509e1..dbf58821 100644 --- a/modules.d/40network/dhclient.conf +++ b/modules.d/40network/dhclient.conf @@ -1,3 +1,3 @@ request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, domain-search, host-name, - root-path, interface-mtu; + root-path, interface-mtu; diff --git a/modules.d/40network/ifup b/modules.d/40network/ifup index 47cec342..bab30146 100755 --- a/modules.d/40network/ifup +++ b/modules.d/40network/ifup @@ -32,10 +32,10 @@ load_ipv6() { do_ipv6auto() { load_ipv6 { - echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding + echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects - echo ip link set $netif up + echo ip link set $netif up echo wait_for_if_up $netif } > /tmp/net.$netif.up @@ -44,13 +44,13 @@ do_ipv6auto() { namesrv=$(getargs nameserver) if [ -n "$namesrv" ] ; then for s in $namesrv; do - echo nameserver $s + echo nameserver $s done fi >> /tmp/net.$netif.resolv.conf echo online > /sys/class/net/$netif/uevent - initqueue --onetime --name netroot-$netif netroot $netif + initqueue --onetime --name netroot-$netif netroot $netif } # Handle static ip configuration @@ -58,7 +58,7 @@ do_static() { strstr $ip '*:*:*' && load_ipv6 { - echo ip link set $netif up + echo ip link set $netif up echo wait_for_if_up $netif # do not flush addr for ipv6 strstr $ip '*:*:*' || \ @@ -72,12 +72,12 @@ do_static() { namesrv=$(getargs nameserver) if [ -n "$namesrv" ] ; then for s in $namesrv; do - echo nameserver $s + echo nameserver $s done fi >> /tmp/net.$netif.resolv.conf echo online > /sys/class/net/$netif/uevent - initqueue --onetime --name netroot-$netif netroot $netif + initqueue --onetime --name netroot-$netif netroot $netif } export PS4="ifup.$1.$$ + " @@ -223,7 +223,7 @@ for p in $(getargs ip=); do do_dhcp -6 ;; auto6) do_ipv6auto ;; - *) + *) do_static ;; esac break diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index 0f0ce655..d75114f8 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh @@ -5,7 +5,7 @@ check() { . $dracutfunctions - for program in ip arping dhclient ; do + for program in ip arping dhclient ; do if ! type -P $program >/dev/null; then derror "Could not find program \"$program\" required by network." return 1 @@ -42,12 +42,12 @@ installkernel() { } install() { - dracut_install ip arping tr dhclient + dracut_install ip arping tr dhclient dracut_install -o brctl ifenslave inst "$moddir/ifup" "/sbin/ifup" inst "$moddir/netroot" "/sbin/netroot" inst "$moddir/dhclient-script" "/sbin/dhclient-script" - inst "$moddir/dhclient.conf" "/etc/dhclient.conf" + inst "$moddir/dhclient.conf" "/etc/dhclient.conf" inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" inst_hook pre-udev 60 "$moddir/net-genrules.sh" inst_hook cmdline 91 "$moddir/dhcp-root.sh" diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot index b880cde5..462da519 100755 --- a/modules.d/40network/netroot +++ b/modules.d/40network/netroot @@ -20,18 +20,18 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh [ -z "$netroot" ] && exit 1 # Let's see if we have to wait for other interfaces -# Note: exit works just fine, since the last interface to be +# Note: exit works just fine, since the last interface to be # online'd should see all files [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces for iface in $IFACES ; do [ -e /tmp/net.$iface.up ] || exit 1 done -# Set or override primary interface +# Set or override primary interface netif=$1 [ -e "/tmp/net.bootdev" ] && read netif < /tmp/net.bootdev -# Figure out the handler for root=dhcp by recalling all netroot cmdline +# Figure out the handler for root=dhcp by recalling all netroot cmdline # handlers if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then # Unset root so we can check later @@ -40,7 +40,7 @@ if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then # Load dhcp options [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts - # If we have a specific bootdev with no dhcpoptions or empty root-path, + # If we have a specific bootdev with no dhcpoptions or empty root-path, # we die. Otherwise we just warn if [ -z "$new_root_path" ] ; then [ -n "$BOOTDEV" ] && die "No dhcp root-path received for '$BOOTDEV'" @@ -55,7 +55,7 @@ if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then for f in $hookdir/cmdline/90*.sh; do [ -f "$f" ] && . "$f"; done -else +else rootok="1" fi @@ -89,7 +89,7 @@ done # Note: This assumes that if no router is present the # root server is on the same subnet. # -# TODO There's some netroot variants that don't (yet) have their +# TODO There's some netroot variants that don't (yet) have their # server-ip netroot # Get router IP if set @@ -136,7 +136,7 @@ if $handler $netif $netroot $NEWROOT; then # Save used netif for later use [ ! -f /tmp/net.ifaces ] && echo $netif > /tmp/net.ifaces -else +else warn "Mounting root via '$netif' failed" # If we're trying with multiple interfaces, put that one down. # ip down/flush ensures that routeing info goes away as well diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh index 5c21bb89..903a800b 100755 --- a/modules.d/40network/parse-bond.sh +++ b/modules.d/40network/parse-bond.sh @@ -13,7 +13,7 @@ # return if bond already parsed [ -n "$bondname" ] && return -# Check if bond parameter is valid +# Check if bond parameter is valid if getarg bond= >/dev/null ; then if [ -z "$netroot" ] ; then die "No netboot configured, bond is invalid" @@ -46,7 +46,7 @@ unset bondname bondslaves bondoptions if getarg bond >/dev/null; then # Read bond= parameters if they exist bond="$(getarg bond=)" - if [ ! "$bond" = "bond" ]; then + if [ ! "$bond" = "bond" ]; then parsebond "$(getarg bond=)" fi # Simple default bond diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh index 92a6a33a..9c19c6a0 100755 --- a/modules.d/40network/parse-bridge.sh +++ b/modules.d/40network/parse-bridge.sh @@ -11,7 +11,7 @@ # return if bridge already parsed [ -n "$bridgename" ] && return -# Check if bridge parameter is valid +# Check if bridge parameter is valid if getarg bridge= >/dev/null ; then if [ -z "$netroot" ] ; then die "No netboot configured, bridge is invalid" @@ -49,7 +49,7 @@ fi if getarg bridge >/dev/null; then # Read bridge= parameters if they exist bridge="$(getarg bridge=)" - if [ ! "$bridge" = "bridge" ]; then + if [ ! "$bridge" = "bridge" ]; then parsebridge "$(getarg bridge=)" fi # Simple default bridge diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh index 608fc88a..3e83ee3b 100755 --- a/modules.d/40network/parse-ip-opts.sh +++ b/modules.d/40network/parse-ip-opts.sh @@ -156,7 +156,7 @@ for p in $(getargs ip=); do done # This ensures that BOOTDEV is always first in IFACES -if [ -n "$BOOTDEV" ] && [ -n "$IFACES" ] ; then +if [ -n "$BOOTDEV" ] && [ -n "$IFACES" ] ; then IFACES="${IFACES%$BOOTDEV*} ${IFACES#*$BOOTDEV}" IFACES="$BOOTDEV $IFACES" fi @@ -165,5 +165,5 @@ fi [ -n "$BOOTDEV" ] && echo $BOOTDEV > /tmp/net.bootdev [ -n "$IFACES" ] && echo $IFACES > /tmp/net.ifaces -# We need a ip= line for the configured bootdev= +# We need a ip= line for the configured bootdev= [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEVOK" ] && die "Bootdev Argument '$BOOTDEV' not found" diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh index ec478974..d633a965 100755 --- a/modules.d/45ifcfg/write-ifcfg.sh +++ b/modules.d/45ifcfg/write-ifcfg.sh @@ -31,18 +31,18 @@ for netif in $IFACES ; do fi cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr { - echo "# Generated by dracut initrd" + echo "# Generated by dracut initrd" echo "DEVICE=$netif" echo "ONBOOT=yes" echo "NETBOOT=yes" if [ -f /tmp/net.$netif.lease ]; then strstr "$ip" '*:*:*' && - echo "DHCPV6C=yes" - echo "BOOTPROTO=dhcp" + echo "DHCPV6C=yes" + echo "BOOTPROTO=dhcp" else - echo "BOOTPROTO=none" + echo "BOOTPROTO=none" # If we've booted with static ip= lines, the override file is there - [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override + [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override echo "IPADDR=$ip" echo "NETMASK=$mask" [ -n "$gw" ] && echo "GATEWAY=$gw" @@ -55,7 +55,7 @@ for netif in $IFACES ; do { echo "HWADDR=$(cat /sys/class/net/$netif/address)" echo "TYPE=Ethernet" - echo "NAME=\"Boot Disk\"" + echo "NAME=\"Boot Disk\"" } >> /tmp/ifcfg/ifcfg-$netif fi @@ -88,7 +88,7 @@ for netif in $IFACES ; do # bridge { echo "TYPE=Bridge" - echo "NAME=\"Boot Disk\"" + echo "NAME=\"Boot Disk\"" } >> /tmp/ifcfg/ifcfg-$netif if [ "$ethname" = "$bondname" ] ; then { @@ -100,7 +100,7 @@ for netif in $IFACES ; do # This variable is an indicator of a bond interface for initscripts echo "BONDING_OPTS=\"$bondoptions\"" echo "BRIDGE=$netif" - echo "NAME=\"$bondname\"" + echo "NAME=\"$bondname\"" } >> /tmp/ifcfg/ifcfg-$bondname for slave in $bondslaves ; do # write separate ifcfg file for the raw eth interface diff --git a/modules.d/50gensplash/module-setup.sh b/modules.d/50gensplash/module-setup.sh index c34413e0..eea063b9 100755 --- a/modules.d/50gensplash/module-setup.sh +++ b/modules.d/50gensplash/module-setup.sh @@ -14,7 +14,7 @@ depends() { install() { call_splash_geninitramfs() { - local out ret + local out ret out=$(splash_geninitramfs -c "$1" ${@:2} 2>&1) ret=$? diff --git a/modules.d/50plymouth/plymouth-populate-initrd b/modules.d/50plymouth/plymouth-populate-initrd index 28c225cd..25657aeb 100755 --- a/modules.d/50plymouth/plymouth-populate-initrd +++ b/modules.d/50plymouth/plymouth-populate-initrd @@ -7,11 +7,11 @@ PLYMOUTH_THEME=$(plymouth-set-default-theme) inst /sbin/plymouthd /bin/plymouthd dracut_install /bin/plymouth \ "${PLYMOUTH_LOGO_FILE}" \ - /etc/system-release + /etc/system-release mkdir -m 0755 -p "${initdir}/usr/share/plymouth" -if [[ $hostonly ]]; then +if [[ $hostonly ]]; then dracut_install "${usrlibdir}/plymouth/text.so" \ "${usrlibdir}/plymouth/details.so" \ "/usr/share/plymouth/themes/details/details.plymouth" \ @@ -44,6 +44,6 @@ else done ( cd ${initdir}/usr/share/plymouth/themes; - ln -s text/text.plymouth default.plymouth 2>&1; + ln -s text/text.plymouth default.plymouth 2>&1; ) fi diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh index 4bcd468f..122d88ed 100644 --- a/modules.d/90crypt/crypt-lib.sh +++ b/modules.d/90crypt/crypt-lib.sh @@ -215,7 +215,7 @@ readkey() { fi ;; *) cat "$mntp/$keypath" ;; - esac + esac umount "$mntp" rmdir "$mntp" diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh index 252e3a01..f8e1bd83 100755 --- a/modules.d/90crypt/cryptroot-ask.sh +++ b/modules.d/90crypt/cryptroot-ask.sh @@ -43,7 +43,7 @@ if [ -f /etc/crypttab ] && getargbool 1 rd.luks.crypttab -n rd_NO_CRYPTTAB; then luksname="$name" break fi - + # path used in crypttab else cdev=$(readlink -f $dev) diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh index 8751a6a6..c07aa6ab 100755 --- a/modules.d/90crypt/module-setup.sh +++ b/modules.d/90crypt/module-setup.sh @@ -13,7 +13,7 @@ check() { [[ $hostonly ]] && { rootdev=$(find_root_block_device) if [[ $rootdev ]]; then - # root lives on a block device, so we can be more precise about + # root lives on a block device, so we can be more precise about # hostonly checking check_block_and_slaves is_crypt "$rootdev" || return 1 else diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh index 1ff7cacf..7ec232ac 100755 --- a/modules.d/90crypt/parse-crypt.sh +++ b/modules.d/90crypt/parse-crypt.sh @@ -13,7 +13,7 @@ else LUKS=$(getargs rd.luks.uuid rd_LUKS_UUID) if [ -n "$LUKS" ]; then - for luksid in $LUKS; do + for luksid in $LUKS; do luksid=${luksid##luks-} { printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", ' @@ -34,7 +34,7 @@ else { printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue) printf -- '--unique --onetime --name cryptroot-ask-%%k ' - printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $(command -v cryptroot-ask) + printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $(command -v cryptroot-ask) } >> /etc/udev/rules.d/70-luks.rules.new fi diff --git a/modules.d/90dm/dm-pre-udev.sh b/modules.d/90dm/dm-pre-udev.sh index c4b67ab5..b7979c83 100755 --- a/modules.d/90dm/dm-pre-udev.sh +++ b/modules.d/90dm/dm-pre-udev.sh @@ -1,4 +1,4 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -strstr "$(cat /proc/misc)" device-mapper || modprobe dm_mod +strstr "$(cat /proc/misc)" device-mapper || modprobe dm_mod diff --git a/modules.d/90dmraid/dmraid.sh b/modules.d/90dmraid/dmraid.sh index f913d84d..feff5166 100755 --- a/modules.d/90dmraid/dmraid.sh +++ b/modules.d/90dmraid/dmraid.sh @@ -21,8 +21,8 @@ echo $SETS|vinfo if [ -n "$DM_RAIDS" ]; then # only activate specified DM RAIDS - for r in $DM_RAIDS; do - for s in $SETS; do + for r in $DM_RAIDS; do + for s in $SETS; do if [ "${s##$r}" != "$s" ]; then info "Activating $s" dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo @@ -31,7 +31,7 @@ if [ -n "$DM_RAIDS" ]; then fi done done -else +else # scan and activate all DM RAIDS for s in $SETS; do info "Activating $s" diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh index 6950d3ca..bf41e9aa 100755 --- a/modules.d/90dmraid/module-setup.sh +++ b/modules.d/90dmraid/module-setup.sh @@ -16,7 +16,7 @@ check() { [[ $hostonly ]] && { rootdev=$(find_root_block_device) if [[ $rootdev ]]; then - # root lives on a block device, so we can be more precise about + # root lives on a block device, so we can be more precise about # hostonly checking check_block_and_slaves is_dmraid "$rootdev" || return 1 else @@ -34,7 +34,7 @@ depends() { } install() { - dracut_install dmraid partx kpartx + dracut_install dmraid partx kpartx inst dmeventd @@ -42,7 +42,7 @@ install() { [ -e "$i" ] && dracut_install "$i" done - inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules + inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules # files, but provides the one below: inst_rules 64-device-mapper.rules diff --git a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh index 404d1c5f..ce1ca826 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh @@ -5,15 +5,15 @@ case "$root" in live:/dev/*) { printf 'KERNEL=="%s", SYMLINK+="live"\n' \ - ${root#live:/dev/} + ${root#live:/dev/} printf 'SYMLINK=="%s", SYMLINK+="live"\n' \ - ${root#live:/dev/} + ${root#live:/dev/} } >> $UDEVRULESD/99-live-mount.rules { printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \ - ${root#live:/dev/} + ${root#live:/dev/} printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \ - ${root#live:/dev/} + ${root#live:/dev/} } >> $UDEVRULESD/99-live-squash.rules echo '[ -e /dev/root ]' > $hookdir/initqueue/finished/dmsquash.sh ;; diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh index 40ec0c10..493d11d2 100755 --- a/modules.d/90dmsquash-live/module-setup.sh +++ b/modules.d/90dmsquash-live/module-setup.sh @@ -9,7 +9,7 @@ check() { } depends() { - # if dmsetup is not installed, then we cannot support fedora/red hat + # if dmsetup is not installed, then we cannot support fedora/red hat # style live images echo dm rootfs-block return 0 diff --git a/modules.d/90kernel-modules/insmodpost.sh b/modules.d/90kernel-modules/insmodpost.sh index c3d77140..1b8ccfa4 100755 --- a/modules.d/90kernel-modules/insmodpost.sh +++ b/modules.d/90kernel-modules/insmodpost.sh @@ -2,10 +2,10 @@ # -*- 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 rd.driver.post rdinsmodpost=); do +for p in $(getargs rd.driver.post rdinsmodpost=); do ( IFS=, - for p in $i; do + for p in $i; do modprobe $p done ) diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh index 5764bf50..90ff5b53 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -17,7 +17,7 @@ installkernel() { hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-microsoft ehci-hcd ohci-hcd uhci-hcd instmods "=drivers/pcmcia" =ide "=drivers/usb/storage" - instmods $(filter_kernel_modules block_module_test) + instmods $(filter_kernel_modules block_module_test) # if not on hostonly mode, install all known filesystems, # if the required list is not set via the filesystems variable if ! [[ $hostonly ]]; then diff --git a/modules.d/90kernel-modules/parse-kernel.sh b/modules.d/90kernel-modules/parse-kernel.sh index 832413b1..285ee904 100755 --- a/modules.d/90kernel-modules/parse-kernel.sh +++ b/modules.d/90kernel-modules/parse-kernel.sh @@ -2,25 +2,25 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # 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 rdloaddriver=); do + ( IFS=, - for p in $i; do + for p in $i; do modprobe $p 2>&1 | vinfo done ) done -for i in $(getargs rd.driver.blacklist rdblacklist=); do +for i in $(getargs rd.driver.blacklist rdblacklist=); do ( IFS=, - for p in $i; do + for p in $i; do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf done ) done -for p in $(getargs rd.driver.post rdinsmodpost=); do +for p in $(getargs rd.driver.post rdinsmodpost=); do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf _do_insmodpost=1 done diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh index bec04200..4f74616e 100755 --- a/modules.d/90lvm/lvm_scan.sh +++ b/modules.d/90lvm/lvm_scan.sh @@ -20,7 +20,7 @@ lvmdevs=$( done ) -if [ ! -e /etc/lvm/lvm.conf ]; then +if [ ! -e /etc/lvm/lvm.conf ]; then { echo 'devices {'; echo -n ' filter = [ ' @@ -28,7 +28,7 @@ if [ ! -e /etc/lvm/lvm.conf ]; then printf '"a|^/dev/%s$|", ' $dev; done; echo '"r/.*/" ]'; - echo '}'; + echo '}'; # establish LVM locking if [ -n $SNAPSHOT ]; then @@ -66,7 +66,7 @@ IFS=$OLDIFS maj=${1##*:} min=$2 sub=${3%% *} -sub=${sub%%\(*}; +sub=${sub%%\(*}; check_lvm_ver 2 2 57 $maj $min $sub && \ nopoll="--poll n" diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh index f3da2424..6e582bdd 100755 --- a/modules.d/90lvm/module-setup.sh +++ b/modules.d/90lvm/module-setup.sh @@ -14,7 +14,7 @@ check() { [[ $hostonly ]] && { rootdev=$(find_root_block_device) if [[ $rootdev ]]; then - # root lives on a block device, so we can be more precise about + # root lives on a block device, so we can be more precise about # hostonly checking check_block_and_slaves is_lvm "$rootdev" || return 1 else @@ -35,9 +35,9 @@ depends() { install() { inst lvm - inst_rules "$moddir/64-lvm.rules" + inst_rules "$moddir/64-lvm.rules" - if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then + if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then if [ -f /etc/lvm/lvm.conf ]; then inst /etc/lvm/lvm.conf # FIXME: near-term hack to establish read-only locking; diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules index 521a7e11..2cf999a8 100644 --- a/modules.d/90mdraid/65-md-incremental-imsm.rules +++ b/modules.d/90mdraid/65-md-incremental-imsm.rules @@ -22,10 +22,10 @@ KERNEL!="md*", IMPORT{program}="/sbin/mdadm --examine --export $tempnode" LABEL="do_md_inc" -# +# # if rd_MDADMCONF do not assemble incrementally # defer auto assembly until the udev queue is settled -# +# ENV{rd_MDADMCONF}!="?*", GOTO="md_auto_end" RUN+="/bin/sh -c 'ln -s /sbin/md_finished.sh $hookdir/initqueue/finished/md_finished.sh;/sbin/initqueue --settled --onetime --unique /sbin/mdadm_auto'" diff --git a/modules.d/90mdraid/mdadm_auto.sh b/modules.d/90mdraid/mdadm_auto.sh index 58f74298..915fb285 100755 --- a/modules.d/90mdraid/mdadm_auto.sh +++ b/modules.d/90mdraid/mdadm_auto.sh @@ -3,5 +3,5 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -info "Autoassembling MD Raid" +info "Autoassembling MD Raid" mdadm -As --auto=yes --run 2>&1 | vinfo diff --git a/modules.d/90mdraid/mdraid-cleanup.sh b/modules.d/90mdraid/mdraid-cleanup.sh index ea9e1792..add02e09 100755 --- a/modules.d/90mdraid/mdraid-cleanup.sh +++ b/modules.d/90mdraid/mdraid-cleanup.sh @@ -7,8 +7,8 @@ for i in /dev/md* /dev/md/*; do [ -b $i ] || continue mddetail=$(udevadm info --query=property --name=$i) - case "$mddetail" in - *MD_LEVEL=container*) + case "$mddetail" in + *MD_LEVEL=container*) ;; *DEVTYPE=partition*) ;; diff --git a/modules.d/90mdraid/mdraid_start.sh b/modules.d/90mdraid/mdraid_start.sh index fbea2af7..4aa7f823 100755 --- a/modules.d/90mdraid/mdraid_start.sh +++ b/modules.d/90mdraid/mdraid_start.sh @@ -11,7 +11,7 @@ mdadm -Is --run 2>&1 | vinfo # there could still be some leftover devices # which have had a container added -for md in /dev/md[0-9]* /dev/md/*; do +for md in /dev/md[0-9]* /dev/md/*; do [ -b "$md" ] || continue udevinfo="$(udevadm info --query=env --name=$md)" strstr "$udevinfo" "MD_UUID=" && continue diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh index 8f698220..d3595c5b 100755 --- a/modules.d/90mdraid/module-setup.sh +++ b/modules.d/90mdraid/module-setup.sh @@ -14,7 +14,7 @@ check() { [[ $hostonly ]] && { rootdev=$(find_root_block_device) if [[ $rootdev ]]; then - # root lives on a block device, so we can be more precise about + # root lives on a block device, so we can be more precise about # hostonly checking check_block_and_slaves is_mdraid "$rootdev" || return 1 else @@ -36,12 +36,12 @@ installkernel() { } install() { - dracut_install mdadm partx + dracut_install mdadm partx # XXX: mdmon really needs to run as non-root? # If so, write only the user it needs in the initrd's /etc/passwd (and maybe /etc/group) - # in a similar fashion to modules.d/95nfs. Do not copy /etc/passwd and /etc/group from + # in a similar fashion to modules.d/95nfs. Do not copy /etc/passwd and /etc/group from # the system into the initrd. # dledford has hardware to test this, so he should be able to clean this up. # inst /etc/passwd @@ -53,11 +53,11 @@ install() { inst_rules "$moddir/65-md-incremental-imsm.rules" - if ! mdadm -Q -e imsm /dev/null &> /dev/null; then + if ! mdadm -Q -e imsm /dev/null &> /dev/null; then inst_hook pre-trigger 30 "$moddir/md-noimsm.sh" fi - if [[ $hostonly ]] || [[ $mdadmconf = "yes" ]]; then + if [[ $hostonly ]] || [[ $mdadmconf = "yes" ]]; then if [ -f /etc/mdadm.conf ]; then inst /etc/mdadm.conf else @@ -67,7 +67,7 @@ install() { if [ -x /sbin/mdmon ] ; then dracut_install mdmon - fi + fi inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh" inst "$moddir/mdraid_start.sh" /sbin/mdraid_start diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh index b879b075..6d1b615e 100755 --- a/modules.d/90mdraid/parse-md.sh +++ b/modules.d/90mdraid/parse-md.sh @@ -11,17 +11,17 @@ else if [ -n "$MD_UUID" ]; then for f in /etc/udev/rules.d/65-md-incremental*.rules; do [ -e "$f" ] || continue - while read line; do + while read line; do if [ "${line%%UUID CHECK}" != "$line" ]; then for uuid in $MD_UUID; do printf 'ENV{MD_UUID}=="%s", GOTO="do_md_inc"\n' $uuid done; - printf 'GOTO="md_inc_end"\n'; + printf 'GOTO="md_inc_end"\n'; else - echo $line; + echo $line; fi done < "${f}" > "${f}.new" - mv "${f}.new" "$f" + mv "${f}.new" "$f" done fi fi diff --git a/modules.d/90multipath/multipathd-stop.sh b/modules.d/90multipath/multipathd-stop.sh index e6a0c086..3fb6c07a 100755 --- a/modules.d/90multipath/multipathd-stop.sh +++ b/modules.d/90multipath/multipathd-stop.sh @@ -4,7 +4,7 @@ if [ -e /etc/multipath.conf ]; then HARD="" - while pidof multipathd >/dev/null 2>&1; do + while pidof multipathd >/dev/null 2>&1; do for pid in $(pidof multipathd); do kill $HARD $pid >/dev/null 2>&1 done diff --git a/modules.d/90multipath/multipathd.sh b/modules.d/90multipath/multipathd.sh index 24daf820..4d8935f6 100755 --- a/modules.d/90multipath/multipathd.sh +++ b/modules.d/90multipath/multipathd.sh @@ -6,6 +6,6 @@ if [ -e /etc/multipath.conf ]; then modprobe dm-multipath multipathd -B || multipathd else - rm /etc/udev/rules.d/??-multipath.rules 2>/dev/null + rm /etc/udev/rules.d/??-multipath.rules 2>/dev/null fi diff --git a/modules.d/95dasd_mod/module-setup.sh b/modules.d/95dasd_mod/module-setup.sh index 0f8700c0..f6f79d7d 100755 --- a/modules.d/95dasd_mod/module-setup.sh +++ b/modules.d/95dasd_mod/module-setup.sh @@ -4,7 +4,7 @@ check() { arch=$(uname -m) - [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 return 0 } diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh index 0c172512..61830691 100755 --- a/modules.d/95debug/module-setup.sh +++ b/modules.d/95debug/module-setup.sh @@ -12,7 +12,7 @@ depends() { } install() { - dracut_install -o ps grep more cat rm strace free showmount + dracut_install -o ps grep more cat rm strace free showmount dracut_install -o ping netstat rpcinfo vi scp ping6 ssh dracut_install -o fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh index 67388364..6beb14a3 100755 --- a/modules.d/95fcoe/module-setup.sh +++ b/modules.d/95fcoe/module-setup.sh @@ -21,8 +21,8 @@ installkernel() { } install() { - dracut_install ip - inst dcbtool + dracut_install ip + inst dcbtool inst fipvlan inst lldpad diff --git a/modules.d/95iscsi/iscsiroot b/modules.d/95iscsi/iscsiroot index 6cb545ba..7439af38 100755 --- a/modules.d/95iscsi/iscsiroot +++ b/modules.d/95iscsi/iscsiroot @@ -4,7 +4,7 @@ # # This implementation is incomplete: Discovery mode is not implemented and # the argument handling doesn't follow currently agreed formats. This is mainly -# because rfc4173 does not say anything about iscsi_initiator but open-iscsi's +# because rfc4173 does not say anything about iscsi_initiator but open-iscsi's # iscsistart needs this. # @@ -18,7 +18,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin # Huh? Empty $2? [ -z "$2" ] && exit 1 -# Huh? Empty $3? This isn't really necessary, since NEWROOT isn't +# Huh? Empty $3? This isn't really necessary, since NEWROOT isn't # used here. But let's be consistent [ -z "$3" ] && exit 1 @@ -69,7 +69,7 @@ arg=$(getargs rd.iscsi.in.username iscsi_in_username=) arg=$(getargs rd.iscsi.in.password iscsi_in_password=) [ -n "$arg" ] && iscsi_in_password=$arg -handle_netroot() +handle_netroot() { iroot=$1 # override conf/commandline options by dhcp root_path @@ -78,7 +78,7 @@ handle_netroot() IFS=@ set $iroot if [ $# -gt 1 ]; then - authinfo=$1; shift + authinfo=$1; shift iroot=$* # allow empty authinfo to allow having an @ in iscsi_target_name like this: # netroot=iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk @@ -92,13 +92,13 @@ handle_netroot() iscsi_in_password=$4 fi fi - fi + fi IFS="$OLDIFS" local v=${iroot}: local i - set -- + set -- while [ -n "$v" ]; do if [ "${v#\[*:*:*\]:}" != "$v" ]; then # handle IPv6 address @@ -106,7 +106,7 @@ handle_netroot() i="${i##\[}" set -- "$@" "$i" v=${v#\[$i\]:} - else + else set -- "$@" "${v%%:*}" v=${v#*:} fi @@ -183,8 +183,8 @@ handle_netroot() } # loop over all netroot parameter -if getarg netroot; then - for nroot in $(getargs netroot); do +if getarg netroot; then + for nroot in $(getargs netroot); do [ "${netroot%%:*}" = "iscsi" ] || continue handle_netroot ${nroot##iscsi:} done diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh index 793a2430..5f02840a 100755 --- a/modules.d/95iscsi/module-setup.sh +++ b/modules.d/95iscsi/module-setup.sh @@ -45,7 +45,7 @@ installkernel() { local iscsifuncs='iscsi_register_transport' fgrep -q "$iscsifuncs" "$1" } - instmods $(filter_kernel_modules iscsi_module_test) + instmods $(filter_kernel_modules iscsi_module_test) } install() { diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh index 3cf14ef0..c724b76f 100755 --- a/modules.d/95nbd/module-setup.sh +++ b/modules.d/95nbd/module-setup.sh @@ -6,7 +6,7 @@ check() { # If our prerequisites are not met, fail. type -P nbd-client >/dev/null || return 1 - # if an nbd device is not somewhere in the chain of devices root is + # if an nbd device is not somewhere in the chain of devices root is # mounted on, fail the hostonly check. [[ $hostonly ]] && { is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;} diff --git a/modules.d/95nbd/parse-nbdroot.sh b/modules.d/95nbd/parse-nbdroot.sh index 61e5d53a..40fcef6e 100755 --- a/modules.d/95nbd/parse-nbdroot.sh +++ b/modules.d/95nbd/parse-nbdroot.sh @@ -20,7 +20,7 @@ netroot_to_var() { v=${v#*:} done - unset server port + unset server port server=$2; port=$3; } diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh index add0adf5..d61e149b 100755 --- a/modules.d/95nfs/module-setup.sh +++ b/modules.d/95nfs/module-setup.sh @@ -26,9 +26,9 @@ install() { type -P portmap >/dev/null && dracut_install portmap type -P rpcbind >/dev/null && dracut_install rpcbind - dracut_install rpc.statd mount.nfs mount.nfs4 umount - [ -f /etc/netconfig ] && dracut_install /etc/netconfig - dracut_install /etc/services + dracut_install rpc.statd mount.nfs mount.nfs4 umount + [ -f /etc/netconfig ] && dracut_install /etc/netconfig + dracut_install /etc/services dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols dracut_install rpc.idmapd /etc/idmapd.conf dracut_install sed diff --git a/modules.d/95nfs/nfsroot b/modules.d/95nfs/nfsroot index ba37b13c..cca4a326 100755 --- a/modules.d/95nfs/nfsroot +++ b/modules.d/95nfs/nfsroot @@ -46,7 +46,7 @@ if [ -z "$server" ] ; then [ -n "$var" ] && server=$var && break; done - # XXX This blindly assumes that if new_root_path has to used that + # XXX This blindly assumes that if new_root_path has to used that # XXX it really can be used as server server=${server%%:*} fi @@ -113,7 +113,7 @@ else # XXX Should we loop here? { mount -t nfs -o$options${options:+,}nolock,nfsvers=3 $server:$path $NEWROOT || \ mount -t nfs -o$options${options:+,}nolock,nfsvers=2 $server:$path $NEWROOT ; } \ - && { [ -e /dev/root ] || >/dev/root ; } + && { [ -e /dev/root ] || >/dev/root ; } fi # inject new exit_if_exists diff --git a/modules.d/95nfs/nfsroot-cleanup.sh b/modules.d/95nfs/nfsroot-cleanup.sh index b2f178ea..05229023 100755 --- a/modules.d/95nfs/nfsroot-cleanup.sh +++ b/modules.d/95nfs/nfsroot-cleanup.sh @@ -14,7 +14,7 @@ pid=$(pidof rpc.idmapd) pid=$(pidof rpcbind) [ -n "$pid" ] && kill $pid -if incol2 /proc/mounts /var/lib/nfs/rpc_pipefs; then +if incol2 /proc/mounts /var/lib/nfs/rpc_pipefs; then # try to create the destination directory [ -d $NEWROOT/$rpcpipefspath ] || \ mkdir -m 0755 -p $NEWROOT/$rpcpipefspath 2>/dev/null diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh index 35b095d4..1d8d5321 100755 --- a/modules.d/95nfs/parse-nfsroot.sh +++ b/modules.d/95nfs/parse-nfsroot.sh @@ -11,7 +11,7 @@ # root=/dev/nfs nfsroot=[server:]path[,options] # # In Legacy root=/dev/nfs mode, if the 'nfsroot' parameter is not given -# on the command line or is empty, the dhcp root-path is used as +# on the command line or is empty, the dhcp root-path is used as # [server:]path[:options] or the default "/tftpboot/%s" will be used. # # If server is unspecified it will be pulled from one of the following @@ -44,7 +44,7 @@ if [ -n "$netroot" ] ; then fi else netroot=$root; -fi +fi # LEGACY: nfsroot= is valid only if root=/dev/nfs if [ -n "$nfsroot" ] ; then @@ -106,7 +106,7 @@ fi; # Done, all good! rootok=1 -# Shut up init error check or make sure that block parser wont get +# Shut up init error check or make sure that block parser wont get # confused by having /dev/nfs[4] root="$fstype" diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh index cde9fca2..1fe55a7f 100755 --- a/modules.d/95resume/module-setup.sh +++ b/modules.d/95resume/module-setup.sh @@ -9,7 +9,7 @@ install() { [[ -x "${bin}" ]] && { inst "${bin}" /usr/sbin/resume [[ -f /etc/suspend.conf ]] && inst /etc/suspend.conf - break + break } done diff --git a/modules.d/95resume/parse-resume.sh b/modules.d/95resume/parse-resume.sh index 90db4a70..32680c33 100755 --- a/modules.d/95resume/parse-resume.sh +++ b/modules.d/95resume/parse-resume.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 resume=$(getarg resume=) && ! getarg noresume; then +if resume=$(getarg resume=) && ! getarg noresume; then export resume echo "$resume" >/.resume else diff --git a/modules.d/95resume/resume.sh b/modules.d/95resume/resume.sh index b2eb64fa..408ce46f 100755 --- a/modules.d/95resume/resume.sh +++ b/modules.d/95resume/resume.sh @@ -17,7 +17,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin [ -x $(command -v resume) ] && command resume $a_splash "$resume" # parsing the output of ls is Bad, but until there is a better way... - ls -lH "$resume" | ( + ls -lH "$resume" | ( read x x x x maj min x; echo "${maj%,}:$min"> /sys/power/resume) >/.resume diff --git a/modules.d/95rootfs-block/block-genrules.sh b/modules.d/95rootfs-block/block-genrules.sh index 968528b7..41a220f7 100755 --- a/modules.d/95rootfs-block/block-genrules.sh +++ b/modules.d/95rootfs-block/block-genrules.sh @@ -5,11 +5,11 @@ if [ "${root%%:*}" = "block" ]; then { printf 'KERNEL=="%s", SYMLINK+="root"\n' \ - ${root#block:/dev/} + ${root#block:/dev/} printf 'SYMLINK=="%s", SYMLINK+="root"\n' \ - ${root#block:/dev/} + ${root#block:/dev/} } >> $UDEVRULESD/99-root.rules - + printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \ "${root#block:}" "${root#block:}" >> $hookdir/initqueue/settled/blocksymlink.sh diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh index 9f86ba82..8e860247 100755 --- a/modules.d/95rootfs-block/mount-root.sh +++ b/modules.d/95rootfs-block/mount-root.sh @@ -27,7 +27,7 @@ filter_rootopts() { if [ -n "$root" -a -z "${root%%block:*}" ]; then mount -t ${fstype:-auto} -o "$rflags",ro "${root#block:}" "$NEWROOT" \ - && ROOTFS_MOUNTED=yes + && ROOTFS_MOUNTED=yes READONLY= fsckoptions= @@ -77,14 +77,14 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then && ! getarg rootflags \ && [ -f "$NEWROOT/etc/fstab" ] \ && ! [ -L "$NEWROOT/etc/fstab" ]; then - # if $NEWROOT/etc/fstab contains special mount options for + # if $NEWROOT/etc/fstab contains special mount options for # the root filesystem, # remount it with the proper options rootopts="defaults" - while read dev mp fs opts rest; do + while read dev mp fs opts rest; do # skip comments [ "${dev%%#*}" != "$dev" ] && continue - + if [ "$mp" = "/" ]; then rootfs=$fs rootopts=$opts @@ -115,10 +115,10 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then if [ -z "$fastboot" -a "$READONLY" != "yes" ]; then info "Checking filesystems" info fsck -T -t noopts=_netdev -A $fsckoptions - out=$(fsck -T -t noopts=_netdev -A $fsckoptions) + out=$(fsck -T -t noopts=_netdev -A $fsckoptions) export RD_ROOTFS_FSCK=$? echo $RD_ROOTFS_FSCK > /run/initramfs/root-fsck - + # A return of 4 or higher means there were serious problems. if [ $RD_ROOTFS_FSCK -gt 3 ]; then warn $out diff --git a/modules.d/95terminfo/module-setup.sh b/modules.d/95terminfo/module-setup.sh index 8022db3a..f8b77011 100755 --- a/modules.d/95terminfo/module-setup.sh +++ b/modules.d/95terminfo/module-setup.sh @@ -7,7 +7,7 @@ install() { for TERMINFODIR in /lib/terminfo /etc/terminfo /usr/share/terminfo; do [ -d ${TERMINFODIR} ] && break done - + [ -d ${TERMINFODIR} ] && \ dracut_install $(find ${TERMINFODIR} -type f) } diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh index 7966f01c..834df636 100755 --- a/modules.d/95udev-rules/module-setup.sh +++ b/modules.d/95udev-rules/module-setup.sh @@ -10,7 +10,7 @@ install() { dracut_install basename inst_rules 50-udev-default.rules 60-persistent-storage.rules \ 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \ - 60-pcmcia.rules + 60-pcmcia.rules #Some debian udev rules are named differently inst_rules 50-udev.rules 95-late.rules @@ -22,8 +22,8 @@ install() { dracut_install cat uname - inst_dir /run/udev - inst_dir /run/udev/rules.d + inst_dir /run/udev + inst_dir /run/udev/rules.d if [ ! -x /lib/udev/vol_id ]; then dracut_install blkid diff --git a/modules.d/95zfcp/module-setup.sh b/modules.d/95zfcp/module-setup.sh index 06c8d8f6..cb0b7198 100755 --- a/modules.d/95zfcp/module-setup.sh +++ b/modules.d/95zfcp/module-setup.sh @@ -4,14 +4,14 @@ check() { arch=$(uname -m) - [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 return 0 } depends() { arch=$(uname -m) - [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 return 0 } diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh index 2ce9c683..5af454ad 100755 --- a/modules.d/95zfcp/parse-zfcp.sh +++ b/modules.d/95zfcp/parse-zfcp.sh @@ -5,7 +5,7 @@ getargbool 1 rd.zfcp.conf -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf for zfcp_arg in $(getargs rd.zfcp 'rd_ZFCP='); do - ( + ( IFS="," set $zfcp_arg echo "$@" >> /etc/zfcp.conf diff --git a/modules.d/95zfcp/zfcpconf.sh b/modules.d/95zfcp/zfcpconf.sh index 4e92461f..ceced355 100755 --- a/modules.d/95zfcp/zfcpconf.sh +++ b/modules.d/95zfcp/zfcpconf.sh @@ -6,15 +6,15 @@ # deviceno WWPN FCPLUN # # Example: -# 0.0.4000 0x5005076300C213e9 0x5022000000000000 -# 0.0.4001 0x5005076300c213e9 0x5023000000000000 +# 0.0.4000 0x5005076300C213e9 0x5022000000000000 +# 0.0.4001 0x5005076300c213e9 0x5023000000000000 # # # manual setup: # modprobe zfcp # echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.4000/online # echo LUN > /sys/bus/ccw/drivers/zfcp/0.0.4000/WWPN/unit_add -# +# # Example: # modprobe zfcp # echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.4000/online diff --git a/modules.d/95znet/module-setup.sh b/modules.d/95znet/module-setup.sh index 0964761b..fbb79aaf 100755 --- a/modules.d/95znet/module-setup.sh +++ b/modules.d/95znet/module-setup.sh @@ -4,7 +4,7 @@ check() { arch=$(uname -m) - [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 return 0 } diff --git a/modules.d/98selinux/selinux-loadpolicy.sh b/modules.d/98selinux/selinux-loadpolicy.sh index 86a99e9d..4d28518d 100755 --- a/modules.d/98selinux/selinux-loadpolicy.sh +++ b/modules.d/98selinux/selinux-loadpolicy.sh @@ -2,11 +2,11 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -# FIXME: load selinux policy. this should really be done after we switchroot +# FIXME: load selinux policy. this should really be done after we switchroot rd_load_policy() { - # If SELinux is disabled exit now + # If SELinux is disabled exit now getarg "selinux=0" > /dev/null && return 0 SELINUX="enforcing" @@ -14,7 +14,7 @@ rd_load_policy() # Check whether SELinux is in permissive mode permissive=0 - getarg "enforcing=0" > /dev/null + getarg "enforcing=0" > /dev/null if [ $? -eq 0 -o "$SELINUX" = "permissive" ]; then permissive=1 fi @@ -24,7 +24,7 @@ rd_load_policy() local ret=0 local out info "Loading SELinux policy" - # load_policy does mount /proc and /selinux in + # load_policy does mount /proc and /selinux in # libselinux,selinux_init_load_policy() if [ -x "$NEWROOT/sbin/load_policy" ]; then out=$(chroot "$NEWROOT" /sbin/load_policy -i 2>&1) diff --git a/modules.d/98syslog/README b/modules.d/98syslog/README index 4a0e10bb..30a819c0 100644 --- a/modules.d/98syslog/README +++ b/modules.d/98syslog/README @@ -1,16 +1,16 @@ Syslog support for dracut This module provides syslog functionality in the initrd. -This is especially interesting when complex configuration being +This is especially interesting when complex configuration being used to provide access to the device the rootfs resides on. -When this module is installed into the ramfs it is triggered by +When this module is installed into the ramfs it is triggered by the udev event from the nic being setup (online). Then if syslog is configured it is started and will forward all kernel messages to the given syslog server. -The syslog implementation is detected automatically by finding the +The syslog implementation is detected automatically by finding the apropriate binary with the following order: rsyslogd syslogd @@ -20,5 +20,5 @@ Then if detected the syslog.conf is generated and syslog is started. Bootparameters: syslogserver=ip Where to syslog to sysloglevel=level What level has to be logged -syslogtype=rsyslog|syslog|syslogng - Don't auto detect syslog but set it +syslogtype=rsyslog|syslog|syslogng + Don't auto detect syslog but set it diff --git a/modules.d/98syslog/parse-syslog-opts.sh b/modules.d/98syslog/parse-syslog-opts.sh index ea582fca..02788ddc 100755 --- a/modules.d/98syslog/parse-syslog-opts.sh +++ b/modules.d/98syslog/parse-syslog-opts.sh @@ -7,7 +7,7 @@ #Bootparameters: #syslogserver=ip Where to syslog to #sysloglevel=level What level has to be logged -#syslogtype=rsyslog|syslog|syslogng +#syslogtype=rsyslog|syslog|syslogng # Don't auto detect syslog but set it type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh index 378de86b..7a5d1016 100755 --- a/modules.d/98syslog/rsyslogd-start.sh +++ b/modules.d/98syslog/rsyslogd-start.sh @@ -13,7 +13,7 @@ rsyslog_config() { shift local filters=$* local filter= - + cat $syslog_template for filter in $filters; do @@ -32,4 +32,4 @@ template=/etc/templates/rsyslog.conf if [ -n "$server" ]; then rsyslog_config "$server" "$template" "$filters" > $conf rsyslogd -c3 -fi +fi diff --git a/modules.d/98syslog/syslog-genrules.sh b/modules.d/98syslog/syslog-genrules.sh index 61597a9b..32c293ae 100755 --- a/modules.d/98syslog/syslog-genrules.sh +++ b/modules.d/98syslog/syslog-genrules.sh @@ -18,7 +18,7 @@ detect_syslog() { fi echo "$syslogtype" [ -n "$syslogtype" ] -} +} read syslogtype < /tmp/syslog.type if [ -z "$syslogtype" ]; then diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 6cb288bd..1c2ce5bd 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -52,12 +52,12 @@ _dogetarg() { for _o in $CMDLINE; do if [ "$_o" = "$1" ]; then - return 0; + return 0; fi [ "${_o%%=*}" = "${1%=}" ] && _val=${_o#*=}; done if [ -n "$_val" ]; then - echo $_val; + echo $_val; return 0; fi return 1; @@ -86,7 +86,7 @@ getarg() { shift;; esac done - [ "$RD_DEBUG" = "yes" ] && set -x + [ "$RD_DEBUG" = "yes" ] && set -x return 1 } @@ -105,7 +105,7 @@ getargbool() { } _dogetargs() { - set +x + set +x local _o _found unset _o unset _found @@ -116,7 +116,7 @@ _dogetargs() { return 0; fi if [ "${_o%%=*}" = "${1%=}" ]; then - echo -n "${_o#*=} "; + echo -n "${_o#*=} "; _found=1; fi done @@ -134,10 +134,10 @@ getargs() { done if [ -n "$_val" ]; then echo -n $_val - [ "$RD_DEBUG" = "yes" ] && set -x + [ "$RD_DEBUG" = "yes" ] && set -x return 0 fi - [ "$RD_DEBUG" = "yes" ] && set -x + [ "$RD_DEBUG" = "yes" ] && set -x return 1; } @@ -146,7 +146,7 @@ getargs() { # it just returns 0. Otherwise 1 is returned. # $1 = options separated by commas # $2 = option we are interested in -# +# # Example: # $1 = cipher=aes-cbc-essiv:sha256,hash=sha256,verify # $2 = hash @@ -199,14 +199,14 @@ setdebug() { if [ -e /proc/cmdline ]; then RD_DEBUG=no if getargbool 0 rd.debug -y rdinitdebug -y rdnetdebug; then - RD_DEBUG=yes + RD_DEBUG=yes [ -n "$BASH" ] && \ export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): '; fi fi export RD_DEBUG fi - [ "$RD_DEBUG" = "yes" ] && set -x + [ "$RD_DEBUG" = "yes" ] && set -x } setdebug @@ -242,7 +242,7 @@ die() { echo "<24>dracut: Refusing to continue"; } > /dev/kmsg - { + { echo "warn dracut: FATAL: \"$@\""; echo "warn dracut: Refusing to continue"; echo "exit 1" @@ -271,11 +271,11 @@ info() { check_quiet echo "<30>dracut: $@" > /dev/kmsg [ "$DRACUT_QUIET" != "yes" ] && \ - echo "dracut: $@" + echo "dracut: $@" } vinfo() { - while read line; do + while read line; do info $line; done } @@ -339,16 +339,16 @@ ismounted() { wait_for_if_up() { local cnt=0 - while [ $cnt -lt 20 ]; do + while [ $cnt -lt 20 ]; do li=$(ip link show $1) [ -z "${li##*state UP*}" ] && return 0 sleep 0.1 cnt=$(($cnt+1)) - done + done return 1 } -# root=nfs:[:][:] +# root=nfs:[:][:] # root=nfs4:[:][:] nfsroot_to_var() { # strip nfs[4]: @@ -370,10 +370,10 @@ nfsroot_to_var() { options="${options##:}" # strip ":" options="${options%%:}" - + # Does it really start with '/'? [ -n "${path%%/*}" ] && path="error"; - + #Fix kernel legacy style separating path and options with ',' if [ "$path" != "${path#*,}" ] ; then options=${path#*,} @@ -384,7 +384,7 @@ nfsroot_to_var() { ip_to_var() { local v=${1}: local i - set -- + set -- while [ -n "$v" ]; do if [ "${v#\[*:*:*\]:}" != "$v" ]; then # handle IPv6 address @@ -392,7 +392,7 @@ ip_to_var() { i="${i##\[}" set -- "$@" "$i" v=${v#\[$i\]:} - else + else set -- "$@" "${v%%:*}" v=${v#*:} fi diff --git a/modules.d/99base/init b/modules.d/99base/init index 708585ed..e2c34c72 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -17,7 +17,7 @@ wait_for_loginit() exec 0<>/dev/console 1<>/dev/console 2<>/dev/console # wait for loginit i=0 - while [ $i -lt 10 ]; do + while [ $i -lt 10 ]; do if [ ! -e /run/initramfs/loginit.pipe ]; then j=$(jobs) [ -z "$j" ] && break @@ -25,7 +25,7 @@ wait_for_loginit() fi sleep 0.1 i=$(($i+1)) - done + done if [ $i -eq 10 ]; then kill %1 >/dev/null 2>&1 @@ -41,7 +41,7 @@ emergency_shell() set +e if [ "$1" = "-n" ]; then _rdshell_name=$2 - shift 2 + shift 2 else _rdshell_name=dracut fi @@ -105,7 +105,7 @@ if ! ismounted /dev; then # try to mount devtmpfs if ! mount -t devtmpfs -o mode=0755,nosuid,noexec udev /dev >/dev/null 2>&1; then # if it failed fall back to normal tmpfs - mount -t tmpfs -o mode=0755,nosuid udev /dev >/dev/null 2>&1 + mount -t tmpfs -o mode=0755,nosuid udev /dev >/dev/null 2>&1 # Make some basic devices first, let udev handle the rest mknod -m 0666 /dev/null c 1 3 mknod -m 0666 /dev/ptmx c 5 2 @@ -143,7 +143,7 @@ if [ $UDEVVERSION -gt 166 ]; then # newer versions of udev use /run/udev/rules.d export UDEVRULESD=/run/udev/rules.d else - mkdir -m 0755 /dev/.udev /dev/.udev/rules.d + mkdir -m 0755 /dev/.udev /dev/.udev/rules.d export UDEVRULESD=/dev/.udev/rules.d fi @@ -209,7 +209,7 @@ i=0 while :; do check_finished && break - + udevsettle check_finished && break @@ -217,7 +217,7 @@ while :; do if [ -f $hookdir/initqueue/work ]; then rm $hookdir/initqueue/work fi - + for job in $hookdir/initqueue/*.sh; do [ -e "$job" ] || break job=$job . $job @@ -241,7 +241,7 @@ while :; do # which report no medium for quiet # some time. for cdrom in /sys/block/sr*; do - [ -e "$cdrom" ] || continue + [ -e "$cdrom" ] || continue # skip, if cdrom medium was already found strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \ ID_CDROM_MEDIA && continue @@ -256,7 +256,7 @@ while :; do echo change > "$cdrom/uevent" fi done - + i=$(($i+1)) [ $i -gt $RDRETRY ] \ && { flock -s 9 ; emergency_shell "No root device \"$root\" found"; } 9>/.console_lock @@ -266,7 +266,7 @@ unset queuetriggered # reset cdrom polling for cdrom in /sys/block/sr*; do - [ -e "$cdrom" ] || continue + [ -e "$cdrom" ] || continue if [ -e "$cdrom"/events_poll_msecs ]; then echo -1 > "$cdrom"/events_poll_msecs fi @@ -296,7 +296,7 @@ done { echo -n "Mounted root filesystem " - while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts + while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts } | vinfo # pre pivot scripts are sourced just before we switch over to the new root. @@ -326,7 +326,7 @@ if [ $UDEVVERSION -lt 168 ]; then udevadm control --stop-exec-queue HARD="" - while pidof udevd >/dev/null 2>&1; do + while pidof udevd >/dev/null 2>&1; do for pid in $(pidof udevd); do kill $HARD $pid >/dev/null 2>&1 done @@ -364,7 +364,7 @@ if getarg init= >/dev/null ; then set $CLINE shift for x in "$@"; do - for s in $ignoreargs; do + for s in $ignoreargs; do [ "${x%%=*}" = $s ] && continue 2 done initargs="$initargs $x" @@ -383,14 +383,14 @@ else done fi [ "$RD_DEBUG" = "yes" ] && set -x - + if [ -d "$NEWROOT"/run ]; then NEWRUN="${NEWROOT}/run" mount --bind /run "$NEWRUN" NEWINITRAMFSROOT="$NEWRUN/initramfs" if [ "$NEWINITRAMFSROOT/lib" -ef "/lib" ]; then - for d in bin etc lib lib64 sbin tmp usr var; do + for d in bin etc lib lib64 sbin tmp usr var; do [ -h /$d ] && ln -fsn $NEWINITRAMFSROOT/$d /$d done fi @@ -401,9 +401,9 @@ else fi wait_for_loginit - + info "Switching root" - + umount -l /run unset PS4 diff --git a/modules.d/99base/initqueue b/modules.d/99base/initqueue index 67b637b6..4cc1faf4 100755 --- a/modules.d/99base/initqueue +++ b/modules.d/99base/initqueue @@ -42,9 +42,9 @@ shift [ -x "$exe" ] || exe=$(command -v $exe) if [ -n "$onetime" ]; then - { + { echo '[ -e "$job" ] && rm "$job"' - echo "$exe $@" + echo "$exe $@" } > "/tmp/$$-${job}.sh" else echo "$exe $@" > "/tmp/$$-${job}.sh" diff --git a/modules.d/99base/loginit b/modules.d/99base/loginit index d20912dc..ff0c3faf 100755 --- a/modules.d/99base/loginit +++ b/modules.d/99base/loginit @@ -12,13 +12,13 @@ printf -- "$$" > /run/initramfs/loginit.pid [ -e /dev/kmsg ] && exec 5>/dev/kmsg || exec 5>/dev/null exec 6>/run/initramfs/init.log -while read line; do +while read line; do if [ "$line" = "DRACUT_LOG_END" ]; then rm -f /run/initramfs/loginit.pipe exit 0 fi echo "<31>dracut: $line" >&5 # if "quiet" is specified we output to /dev/console - [ -n "$QUIET" ] && echo "dracut: $line" + [ -n "$QUIET" ] && echo "dracut: $line" echo "$line" >&6 done diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index f0342d14..0a804d5f 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -7,14 +7,14 @@ check() { } depends() { - echo udev-rules + echo udev-rules return 0 } install() { dracut_install mount mknod mkdir modprobe pidof sleep chroot \ sed ls flock cp mv dmesg rm ln rmmod mkfifo umount - dracut_install -o less + dracut_install -o less if [ ! -e "${initdir}/bin/sh" ]; then dracut_install bash (ln -s bash "${initdir}/bin/sh" || :) diff --git a/test/TEST-01-BASIC/create-root.sh b/test/TEST-01-BASIC/create-root.sh index cf7e11d1..0e91ab54 100755 --- a/test/TEST-01-BASIC/create-root.sh +++ b/test/TEST-01-BASIC/create-root.sh @@ -13,9 +13,9 @@ sfdisk -C 1280 -H 2 -S 32 -L /dev/sda </dev/sda1 diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh index b8295a6b..95724277 100755 --- a/test/TEST-01-BASIC/test.sh +++ b/test/TEST-01-BASIC/test.sh @@ -15,7 +15,7 @@ test_run() { } test_setup() { - + if [ ! -e root.ext3 ]; then # Create the blank file to use as a root filesystem @@ -43,7 +43,7 @@ test_setup() { ( initdir=overlay . $basedir/dracut-functions - dracut_install sfdisk mkfs.ext3 poweroff cp umount + dracut_install sfdisk mkfs.ext3 poweroff cp umount inst_hook initqueue 01 ./create-root.sh inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) @@ -77,7 +77,7 @@ test_setup() { -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ -f initramfs.testing $KVERSION || return 1 -# -o "plymouth network md dmraid multipath fips caps crypt btrfs resume dmsquash-live dm" +# -o "plymouth network md dmraid multipath fips caps crypt btrfs resume dmsquash-live dm" } test_cleanup() { diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index 4feeb5ff..0b3fc0cd 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -24,7 +24,7 @@ test_setup() { initdir=overlay/source . $basedir/dracut-functions dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient + /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script" inst "$basedir/modules.d/40network/ifup" "/sbin/ifup" dracut_install grep @@ -34,16 +34,16 @@ test_setup() { cp -a /etc/ld.so.conf* $initdir/etc sudo ldconfig -r "$initdir" ) - + # second, install the files needed to make the root filesystem ( initdir=overlay . $basedir/dracut-functions - dracut_install sfdisk mke2fs poweroff cp umount + dracut_install sfdisk mke2fs poweroff cp umount inst_hook initqueue 01 ./create-root.sh inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) - + # create an initramfs that will create the target root filesystem. # We do it this way so that we do not risk trashing the host mdraid # devices, volume groups, encrypted partitions, etc. diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh index 83053ff9..813b0728 100755 --- a/test/TEST-11-LVM/test.sh +++ b/test/TEST-11-LVM/test.sh @@ -24,7 +24,7 @@ test_setup() { initdir=overlay/source . $basedir/dracut-functions dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient + /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script" inst "$basedir/modules.d/40network/ifup" "/sbin/ifup" dracut_install grep @@ -35,16 +35,16 @@ test_setup() { mkdir $initdir/run sudo ldconfig -r "$initdir" ) - + # second, install the files needed to make the root filesystem ( initdir=overlay . $basedir/dracut-functions - dracut_install sfdisk mke2fs poweroff cp umount + dracut_install sfdisk mke2fs poweroff cp umount inst_hook initqueue 01 ./create-root.sh inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) - + # create an initramfs that will create the target root filesystem. # We do it this way so that we do not risk trashing the host mdraid # devices, volume groups, encrypted partitions, etc. diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh index 9c6303ae..47eb9614 100755 --- a/test/TEST-12-RAID-DEG/create-root.sh +++ b/test/TEST-12-RAID-DEG/create-root.sh @@ -39,8 +39,8 @@ mdadm /dev/md0 --fail /dev/sda2 --remove /dev/sda2 && \ . /tmp/mduuid; } && \ { -echo "dracut-root-block-created" -echo MD_UUID=$MD_UUID +echo "dracut-root-block-created" +echo MD_UUID=$MD_UUID }> /dev/sda1 dd if=/dev/zero of=/dev/sda2 poweroff -f diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh index 4c23c0c6..1e6b3767 100755 --- a/test/TEST-12-RAID-DEG/test.sh +++ b/test/TEST-12-RAID-DEG/test.sh @@ -27,7 +27,7 @@ test_run() { echo "MD_UUID=$MD_UUID" client_run || return 1 - + # client_run rd.md.conf=0 || return 1 client_run rd.lvm=0 failme && return 1 @@ -52,14 +52,14 @@ test_run() { test_setup() { # Create the blank file to use as a root filesystem dd if=/dev/zero of=root.ext2 bs=1M count=40 - + kernel=$KVERSION # Create what will eventually be our root filesystem onto an overlay ( initdir=overlay/source . $basedir/dracut-functions dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ - /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient + /lib/terminfo/l/linux mount dmesg ifconfig dhclient mkdir cp ping dhclient inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script" inst "$basedir/modules.d/40network/ifup" "/sbin/ifup" dracut_install grep @@ -69,7 +69,7 @@ test_setup() { cp -a /etc/ld.so.conf* $initdir/etc sudo ldconfig -r "$initdir" ) - + # second, install the files needed to make the root filesystem ( initdir=overlay @@ -78,7 +78,7 @@ test_setup() { inst_hook initqueue 01 ./create-root.sh inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) - + # create an initramfs that will create the target root filesystem. # We do it this way so that we do not risk trashing the host mdraid # devices, volume groups, encrypted partitions, etc. diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh index 1b049c36..dab03a01 100755 --- a/test/TEST-13-ENC-RAID-LVM/create-root.sh +++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh @@ -18,7 +18,7 @@ cryptsetup -q luksFormat /dev/sda2 /keyfile cryptsetup -q luksFormat /dev/sda3 /keyfile cryptsetup -q luksFormat /dev/sda4 /keyfile cryptsetup luksOpen /dev/sda2 dracut_sda2 luks.txt - + ( initdir=overlay diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh index 995825be..df0f4146 100755 --- a/test/TEST-14-IMSM/create-root.sh +++ b/test/TEST-14-IMSM/create-root.sh @@ -7,9 +7,9 @@ rm /etc/lvm/lvm.conf udevadm control --reload-rules # dmraid does not want symlinks in --disk "..." -if [ -e /dev/hda ] ; then +if [ -e /dev/hda ] ; then echo y|dmraid -f isw -C Test0 --type 1 --disk "/dev/hdb /dev/hdc" -else +else echo y|dmraid -f isw -C Test0 --type 1 --disk "/dev/sdb /dev/sdc" fi udevadm settle @@ -17,12 +17,12 @@ udevadm settle SETS=$(dmraid -c -s) # scan and activate all DM RAIDS for s in $SETS; do - dmraid -ay -i -p --rm_partitions "$s" - [ -e "/dev/mapper/$s" ] && kpartx -a -p p "/dev/mapper/$s" + dmraid -ay -i -p --rm_partitions "$s" + [ -e "/dev/mapper/$s" ] && kpartx -a -p p "/dev/mapper/$s" done udevadm settle -sfdisk -g /dev/mapper/isw*Test0 +sfdisk -g /dev/mapper/isw*Test0 # save a partition at the beginning for future flagging purposes sfdisk -C 2560 -H 2 -S 32 -L /dev/mapper/isw*Test0 </dev/null && dracut_install portmap type -P rpcbind >/dev/null && dracut_install rpcbind - [ -f /etc/netconfig ] && dracut_install /etc/netconfig + [ -f /etc/netconfig ] && dracut_install /etc/netconfig type -P dhcpd >/dev/null && dracut_install dhcpd [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd instmods nfsd sunrpc ipv6 diff --git a/test/TEST-30-ISCSI/server-init b/test/TEST-30-ISCSI/server-init index 96e958b6..6f24b604 100755 --- a/test/TEST-30-ISCSI/server-init +++ b/test/TEST-30-ISCSI/server-init @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin export TERM=linux export PS1='nfstest-server:\w\$ ' diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh index 32c0d577..5713942f 100755 --- a/test/TEST-30-ISCSI/test.sh +++ b/test/TEST-30-ISCSI/test.sh @@ -93,16 +93,16 @@ test_setup() { cp -a /etc/ld.so.conf* $initdir/etc sudo ldconfig -r "$initdir" ) - + # second, install the files needed to make the root filesystem ( initdir=overlay . $basedir/dracut-functions - dracut_install sfdisk mke2fs poweroff cp umount + dracut_install sfdisk mke2fs poweroff cp umount inst_hook initqueue 01 ./create-root.sh inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ) - + # create an initramfs that will create the target root filesystem. # We do it this way so that we do not risk trashing the host mdraid # devices, volume groups, encrypted partitions, etc. @@ -162,7 +162,7 @@ test_setup() { dracut_install /usr/sbin/iscsi-target instmods iscsi_tcp crc32c ipv6 inst ./targets /etc/iscsi/targets - [ -f /etc/netconfig ] && dracut_install /etc/netconfig + [ -f /etc/netconfig ] && dracut_install /etc/netconfig type -P dhcpd >/dev/null && dracut_install dhcpd [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd inst ./server-init /sbin/init diff --git a/test/TEST-40-NBD/server-init b/test/TEST-40-NBD/server-init index c0f907eb..e8f899c5 100755 --- a/test/TEST-40-NBD/server-init +++ b/test/TEST-40-NBD/server-init @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin export TERM=linux export PS1='nbdtest-server:\w\$ ' diff --git a/test/TEST-50-MULTINIC/server-init b/test/TEST-50-MULTINIC/server-init index edc09504..39f6a1da 100755 --- a/test/TEST-50-MULTINIC/server-init +++ b/test/TEST-50-MULTINIC/server-init @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin export TERM=linux export PS1='nfstest-server:\w\$ ' diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh index fa9ef777..608fffcc 100755 --- a/test/TEST-50-MULTINIC/test.sh +++ b/test/TEST-50-MULTINIC/test.sh @@ -137,7 +137,7 @@ test_setup() { /etc/services sleep mount chmod type -P portmap >/dev/null && dracut_install portmap type -P rpcbind >/dev/null && dracut_install rpcbind - [ -f /etc/netconfig ] && dracut_install /etc/netconfig + [ -f /etc/netconfig ] && dracut_install /etc/netconfig type -P dhcpd >/dev/null && dracut_install dhcpd [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd instmods nfsd sunrpc ipv6 diff --git a/test/test-functions b/test/test-functions index 20ac3b26..70cab538 100644 --- a/test/test-functions +++ b/test/test-functions @@ -4,19 +4,19 @@ export PATH while (($# > 0)); do case $1 in - --run) + --run) echo "TEST RUN: $TEST_DESCRIPTION" test_run exit $?;; - --setup) + --setup) echo "TEST SETUP: $TEST_DESCRIPTION" test_setup exit $?;; - --clean) + --clean) echo "TEST CLEANUP: $TEST_DESCRIPTION" test_cleanup exit $?;; - --all) + --all) echo -n "TEST: $TEST_DESCRIPTION "; ( test_setup && test_run