From 19dc4d9399a835fcd0e0267c0cf2a15ad70449e9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sep 27 2012 10:55:32 +0000 Subject: dracut-023-65.git20120927 - no more iscsi_wait_scan - curl: give info what URL failed, support https - use findmnt - systemd: wait for cryptroot - only install crypttab in host-only mode - add udev groups - fixed busybox install - fixed rd.luks.allow-discards manpage and handling - force install dm_mod - do not create the initramfs world reabable - add nameserver even for dhcp - fallback to reboot if shutdown was called without a parameter --- diff --git a/0039-resume-resume.sh-prevent-resume-not-found.patch b/0039-resume-resume.sh-prevent-resume-not-found.patch new file mode 100644 index 0000000..77d2392 --- /dev/null +++ b/0039-resume-resume.sh-prevent-resume-not-found.patch @@ -0,0 +1,29 @@ +From 0e32ce32194b2a031cf7a09798fdf0c322cf2f38 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 18 Sep 2012 13:37:35 +0200 +Subject: [PATCH] resume/resume.sh: prevent "resume: not found" + +Problem lies in modules.d/95resume: + +[ -x $(command -v resume) ] && command resume $a_splash "$resume" + +``command -v resume'' prints nothing and ``test -x'' returns 0. + +Thanks to Consus! +--- + modules.d/95resume/resume.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95resume/resume.sh b/modules.d/95resume/resume.sh +index 408ce46..6d69b61 100755 +--- a/modules.d/95resume/resume.sh ++++ b/modules.d/95resume/resume.sh +@@ -14,7 +14,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin + a_splash="-P splash=n" + ;; + esac +- [ -x $(command -v resume) ] && command resume $a_splash "$resume" ++ [ -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" | ( diff --git a/0040-bye-bye-iscsi_wait_scan-.-officially-gone-for-kernel.patch b/0040-bye-bye-iscsi_wait_scan-.-officially-gone-for-kernel.patch new file mode 100644 index 0000000..951c2b8 --- /dev/null +++ b/0040-bye-bye-iscsi_wait_scan-.-officially-gone-for-kernel.patch @@ -0,0 +1,61 @@ +From 0fc0dcff60de5d903985944d760d53c093f6687f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 18 Sep 2012 13:39:54 +0200 +Subject: [PATCH] bye bye iscsi_wait_scan ... officially gone for kernel 3.6 + +--- + modules.d/01fips/fips.sh | 2 -- + modules.d/01fips/module-setup.sh | 1 - + modules.d/98systemd/dracut-initqueue.sh | 1 - + modules.d/99base/init.sh | 1 - + 4 files changed, 5 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 324e062..48ad0e6 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -32,8 +32,6 @@ mount_boot() + udevadm settle --timeout=30 + fi + [ -e $boot ] && break +- modprobe scsi_wait_scan && rmmod scsi_wait_scan +- [ -e $boot ] && break + sleep 0.5 + i=$(($i+1)) + [ $i -gt 40 ] && break +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 103a479..6b3e444 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -24,7 +24,6 @@ installkernel() { + echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf" + fi + done +- hostonly='' instmods scsi_wait_scan + } + + install() { +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 773e4cd..e9da432 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -25,7 +25,6 @@ while :; do + check_finished && break + + udevsettle +- modprobe -q scsi_wait_scan && modprobe -q -r scsi_wait_scan + + check_finished && break + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index 4c5a2f8..16c8958 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -156,7 +156,6 @@ while :; do + check_finished && break + + udevsettle +- modprobe -q scsi_wait_scan && modprobe -q -r scsi_wait_scan + + check_finished && break + diff --git a/0041-45url-lib-url-lib.sh-give-info-what-URL-curl-failed-.patch b/0041-45url-lib-url-lib.sh-give-info-what-URL-curl-failed-.patch new file mode 100644 index 0000000..8d690d1 --- /dev/null +++ b/0041-45url-lib-url-lib.sh-give-info-what-URL-curl-failed-.patch @@ -0,0 +1,40 @@ +From 914f531f3955e8416e6098c094a1356a0e7c9d81 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 18 Sep 2012 16:29:42 +0200 +Subject: [PATCH] 45url-lib/url-lib.sh: give info what URL curl failed to + download + +https://bugzilla.redhat.com/show_bug.cgi?id=857836 + +Also allow self signed Certs and use "--insecure". + +https://bugzilla.redhat.com/show_bug.cgi?id=852229 +--- + modules.d/45url-lib/url-lib.sh | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh +index e9ece70..a8069ef 100755 +--- a/modules.d/45url-lib/url-lib.sh ++++ b/modules.d/45url-lib/url-lib.sh +@@ -54,7 +54,7 @@ add_url_handler() { + + export CURL_HOME="/run/initramfs/url-lib" + mkdir -p $CURL_HOME +-curl_args="--location --retry 3 --fail --show-error" ++curl_args="--location --retry 3 --fail --show-error --insecure" + + curl_fetch_url() { + local url="$1" outloc="$2" +@@ -66,7 +66,10 @@ curl_fetch_url() { + ( cd "$outdir"; curl $curl_args --remote-name "$url" || return $? ) + outloc="$outdir/$(ls -A $outdir)" + fi +- [ -f "$outloc" ] || return 253 ++ if ! [ -f "$outloc" ]; then ++ warn "Downloading '$url' failed!" ++ return 253 ++ fi + if [ -z "$2" ]; then echo "$outloc" ; fi + } + add_url_handler curl_fetch_url http https ftp diff --git a/0042-ismounted-fix.patch b/0042-ismounted-fix.patch new file mode 100644 index 0000000..f6ef0fc --- /dev/null +++ b/0042-ismounted-fix.patch @@ -0,0 +1,68 @@ +From d9a7ea5b438125ac1c8cf0d19c5f0b38fd21bbe9 Mon Sep 17 00:00:00 2001 +From: Dave Young +Date: Mon, 17 Sep 2012 18:01:03 +0800 +Subject: [PATCH] ismounted fix + +ismounted handles both find-by-dev and find-by-mnt, but there's two issues: +1. for find-by-dev, it use readlink to get the canonical dev name, but + lvm is different with other devices, the canonical name for lvm devices + are symlinks like /dev/mapper/vg-lv00 +2. for nfs mounting, just use [ -b $dev ] is not enough, it need being handled + seperately. + +Per Karel Zak's suggestion, findmnt util is suitable for this purpose, it +handles these cases well, so just use findmnt instead of implement all the +logic by ourselves. Thanks, Karel. + +Signed-off-by: Dave Young +--- + modules.d/99base/dracut-lib.sh | 19 +------------------ + modules.d/99base/module-setup.sh | 2 +- + 2 files changed, 2 insertions(+), 19 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index fbe6f91..6fd4e0a 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -452,27 +452,10 @@ udevproperty() { + fi + } + +-find_mount() { +- local dev mnt etc wanted_dev +- wanted_dev="$(readlink -e -q $1)" +- while read dev mnt etc; do +- [ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0 +- done < /proc/mounts +- return 1 +-} +- + # usage: ismounted + # usage: ismounted /dev/ + ismounted() { +- if [ -b "$1" ]; then +- find_mount "$1" > /dev/null && return 0 +- return 1 +- fi +- +- while read a m a; do +- [ "$m" = "$1" ] && return 0 +- done < /proc/mounts +- return 1 ++ findmnt "$1" > /dev/null + } + + wait_for_if_up() { +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 115b544..6cc4ad2 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -13,7 +13,7 @@ depends() { + + install() { + local _d +- dracut_install mount mknod mkdir pidof sleep chroot \ ++ dracut_install mount mknod mkdir pidof sleep chroot findmnt\ + sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid + inst $(command -v modprobe) /sbin/modprobe + diff --git a/0043-dash-compat-use-2-1-rather-than.patch b/0043-dash-compat-use-2-1-rather-than.patch new file mode 100644 index 0000000..27238ff --- /dev/null +++ b/0043-dash-compat-use-2-1-rather-than.patch @@ -0,0 +1,85 @@ +From aa09b74a412d5511b533b6d22da51868518ef138 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Sep 2012 10:26:14 +0200 +Subject: [PATCH] dash compat: use "2>&1" rather than "&>" + +--- + modules.d/04watchdog/watchdog.sh | 2 +- + modules.d/90mdraid/module-setup.sh | 4 ++-- + modules.d/90qemu-net/module-setup.sh | 4 ++-- + modules.d/90qemu/module-setup.sh | 4 ++-- + modules.d/96securityfs/securityfs.sh | 2 +- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/modules.d/04watchdog/watchdog.sh b/modules.d/04watchdog/watchdog.sh +index a3fdc26..14c92aa 100755 +--- a/modules.d/04watchdog/watchdog.sh ++++ b/modules.d/04watchdog/watchdog.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + if [ -e /dev/watchdog ]; then + if [ ! -e /tmp/watchdog_timeout ]; then +- wdctl -s 60 /dev/watchdog &>/dev/null ++ wdctl -s 60 /dev/watchdog >/dev/null 2>&1 + > /tmp/watchdog_timeout + fi + info "Triggering watchdog" +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 6119226..3c3f057 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -66,10 +66,10 @@ install() { + inst_rules "$moddir/65-md-incremental-imsm.rules" + + # guard against pre-3.0 mdadm versions, that can't handle containers +- if ! mdadm -Q -e imsm /dev/null &> /dev/null; then ++ if ! mdadm -Q -e imsm /dev/null >/dev/null 2>&1; then + inst_hook pre-trigger 30 "$moddir/md-noimsm.sh" + fi +- if ! mdadm -Q -e ddf /dev/null &> /dev/null; then ++ if ! mdadm -Q -e ddf /dev/null >/dev/null 2>&1; then + inst_hook pre-trigger 30 "$moddir/md-noddf.sh" + fi + +diff --git a/modules.d/90qemu-net/module-setup.sh b/modules.d/90qemu-net/module-setup.sh +index e617230..522a7b5 100755 +--- a/modules.d/90qemu-net/module-setup.sh ++++ b/modules.d/90qemu-net/module-setup.sh +@@ -3,8 +3,8 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- if type -P systemd-detect-virt &>/dev/null; then +- vm=$(systemd-detect-virt --vm &>/dev/null) ++ if type -P systemd-detect-virt >/dev/null 2>&1; then ++ vm=$(systemd-detect-virt --vm >/dev/null 2>&1) + (($? != 0)) && return 255 + [[ $vm = "qemu" ]] && return 0 + [[ $vm = "kvm" ]] && return 0 +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index fc258ac..0dbf081 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -3,8 +3,8 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- if type -P systemd-detect-virt &>/dev/null; then +- vm=$(systemd-detect-virt --vm &>/dev/null) ++ if type -P systemd-detect-virt >/dev/null 2>&1; then ++ vm=$(systemd-detect-virt --vm >/dev/null 2>&1) + (($? != 0)) && return 255 + [[ $vm = "qemu" ]] && return 0 + [[ $vm = "kvm" ]] && return 0 +diff --git a/modules.d/96securityfs/securityfs.sh b/modules.d/96securityfs/securityfs.sh +index 03ee4dd..f6f4b77 100755 +--- a/modules.d/96securityfs/securityfs.sh ++++ b/modules.d/96securityfs/securityfs.sh +@@ -5,6 +5,6 @@ + SECURITYFSDIR="/sys/kernel/security" + export SECURITYFSDIR + +-if ! ismounted "${SECURITYFSDIR}"; then ++if ! findmnt "${SECURITYFSDIR}" >/dev/null 2>&1; then + mount -t securityfs -o nosuid,noexec,nodev securityfs ${SECURITYFSDIR} >/dev/null 2>&1 + fi diff --git a/0044-fallback-to-old-ismounted-if-findmnt-is-not-installe.patch b/0044-fallback-to-old-ismounted-if-findmnt-is-not-installe.patch new file mode 100644 index 0000000..c2e172f --- /dev/null +++ b/0044-fallback-to-old-ismounted-if-findmnt-is-not-installe.patch @@ -0,0 +1,115 @@ +From 4211605000dcb2fef66e90b1c8739f2d02ee1ebc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Sep 2012 10:36:13 +0200 +Subject: [PATCH] fallback to old ismounted, if findmnt is not installed + +--- + modules.d/30convertfs/convertfs.sh | 28 +++++++++++++++++++++++++--- + modules.d/99base/dracut-lib.sh | 29 ++++++++++++++++++++++++++--- + modules.d/99base/module-setup.sh | 5 +++-- + 3 files changed, 54 insertions(+), 8 deletions(-) + +diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh +index d1d25aa..137664a 100755 +--- a/modules.d/30convertfs/convertfs.sh ++++ b/modules.d/30convertfs/convertfs.sh +@@ -73,13 +73,35 @@ if [[ ! -e "$testfile" ]]; then + fi + rm -f "$testfile" + +-ismounted() { +- while read a m a; do +- [[ "$m" = "$1" ]] && return 0 ++find_mount() { ++ local dev mnt etc wanted_dev ++ wanted_dev="$(readlink -e -q $1)" ++ while read dev mnt etc; do ++ [ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0 + done < /proc/mounts + return 1 + } + ++# usage: ismounted ++# usage: ismounted /dev/ ++if command -v findmnt >/dev/null; then ++ ismounted() { ++ findmnt "$1" > /dev/null 2>&1 ++ } ++else ++ ismounted() { ++ if [ -b "$1" ]; then ++ find_mount "$1" > /dev/null && return 0 ++ return 1 ++ fi ++ ++ while read a m a; do ++ [ "$m" = "$1" ] && return 0 ++ done < /proc/mounts ++ return 1 ++ } ++fi ++ + # clean up after ourselves no matter how we die. + cleanup() { + echo "Something failed. Move back to the original state" +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 6fd4e0a..1d90010 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -452,11 +452,34 @@ udevproperty() { + fi + } + ++find_mount() { ++ local dev mnt etc wanted_dev ++ wanted_dev="$(readlink -e -q $1)" ++ while read dev mnt etc; do ++ [ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0 ++ done < /proc/mounts ++ return 1 ++} ++ + # usage: ismounted + # usage: ismounted /dev/ +-ismounted() { +- findmnt "$1" > /dev/null +-} ++if command -v findmnt >/dev/null; then ++ ismounted() { ++ findmnt "$1" > /dev/null 2>&1 ++ } ++else ++ ismounted() { ++ if [ -b "$1" ]; then ++ find_mount "$1" > /dev/null && return 0 ++ return 1 ++ fi ++ ++ while read a m a; do ++ [ "$m" = "$1" ] && return 0 ++ done < /proc/mounts ++ return 1 ++ } ++fi + + wait_for_if_up() { + local cnt=0 +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 6cc4ad2..2bcb6a1 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -13,11 +13,12 @@ depends() { + + install() { + local _d +- dracut_install mount mknod mkdir pidof sleep chroot findmnt\ ++ dracut_install mount mknod mkdir pidof sleep chroot \ + sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid + inst $(command -v modprobe) /sbin/modprobe + +- dracut_install -o less ++ dracut_install -o findmnt less ++ + if [ ! -e "${initdir}/bin/sh" ]; then + dracut_install bash + (ln -s bash "${initdir}/bin/sh" || :) diff --git a/0045-dracut-logger.sh-don-t-check-for-lvl-0-in-dlog_init.patch b/0045-dracut-logger.sh-don-t-check-for-lvl-0-in-dlog_init.patch new file mode 100644 index 0000000..e1593bb --- /dev/null +++ b/0045-dracut-logger.sh-don-t-check-for-lvl-0-in-dlog_init.patch @@ -0,0 +1,40 @@ +From 5596b70bd0e6276861842390829f362c1edf4a2d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 24 Sep 2012 13:04:32 +0200 +Subject: [PATCH] dracut-logger.sh: don't check for *lvl==0 in dlog_init() + +--- + dracut-logger.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dracut-logger.sh b/dracut-logger.sh +index dbe26ee..2ffd9fb 100755 +--- a/dracut-logger.sh ++++ b/dracut-logger.sh +@@ -116,7 +116,7 @@ dlog_init() { + + if [ -z "$fileloglvl" ]; then + [ -w "$logfile" ] && fileloglvl=4 || fileloglvl=0 +- elif (( $fileloglvl >= 0 )); then ++ elif (( $fileloglvl > 0 )); then + __oldumask=$(umask) + umask 0377 + ! [ -e "$logfile" ] && >"$logfile" +@@ -138,7 +138,7 @@ dlog_init() { + fi + fi + +- if (( $sysloglvl >= 0 )); then ++ if (( $sysloglvl > 0 )); then + if ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null + then + # We cannot log to syslog, so turn this facility off. +@@ -148,7 +148,7 @@ dlog_init() { + fi + fi + +- if (($sysloglvl >= 0)) || (($kmsgloglvl >= 0 )); then ++ if (($sysloglvl > 0)) || (($kmsgloglvl > 0 )); then + if [ -n "$dracutbasedir" ]; then + readonly syslogfacility=user + else diff --git a/0046-use-by-uuid-firstly-in-get_persistent_dev.patch b/0046-use-by-uuid-firstly-in-get_persistent_dev.patch new file mode 100644 index 0000000..cbca4fc --- /dev/null +++ b/0046-use-by-uuid-firstly-in-get_persistent_dev.patch @@ -0,0 +1,27 @@ +From f3f97774970e4f83af82ac58d4aab47a4d2ca1c7 Mon Sep 17 00:00:00 2001 +From: Dave Young +Date: Mon, 24 Sep 2012 10:16:26 +0800 +Subject: [PATCH] use by-uuid firstly in get_persistent_dev + +For devices with filesystem, udev /dev/disk/by-uuid/* links are always +reliable. So improve the get_persistent_dev() by using by-uuid/* firstly, +and fallback to use by-id/* + +Signed-off-by: Dave Young +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index e6200c2..cdadacd 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -245,7 +245,7 @@ get_persistent_dev() { + _dev=$(udevadm info --query=name --name="$1" 2>/dev/null) + [ -z "$_dev" ] && return + +- for i in /dev/disk/by-id/*; do ++ for i in /dev/disk/by-uuid/* /dev/disk/by-id/*; do + _tmp=$(udevadm info --query=name --name="$i" 2>/dev/null) + if [ "$_tmp" = "$_dev" ]; then + echo $i diff --git a/0047-systemd-initrd-switch-root.target-run-switch-root.ta.patch b/0047-systemd-initrd-switch-root.target-run-switch-root.ta.patch new file mode 100644 index 0000000..bb339cd --- /dev/null +++ b/0047-systemd-initrd-switch-root.target-run-switch-root.ta.patch @@ -0,0 +1,23 @@ +From 886b9afcc566dd35bdea8a93f4c4dd5b4a2cc14f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 24 Sep 2012 13:12:42 +0200 +Subject: [PATCH] systemd/initrd-switch-root.target: run switch-root.target + after cryptsetup + +Ensure, that all crypto devices have been queried. +--- + modules.d/98systemd/initrd-switch-root.target | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98systemd/initrd-switch-root.target b/modules.d/98systemd/initrd-switch-root.target +index 74647a5..05e0117 100644 +--- a/modules.d/98systemd/initrd-switch-root.target ++++ b/modules.d/98systemd/initrd-switch-root.target +@@ -12,6 +12,7 @@ Description=Switch Root + DefaultDependencies=no + Requires=initrd-switch-root.service + Before=initrd-switch-root.service ++After=cryptsetup.target + AllowIsolate=yes + Wants=systemd-journald.service + ConditionPathExists=/etc/initrd-release diff --git a/0048-crypt-install-etc-crypttab-only-in-host-only-mode.patch b/0048-crypt-install-etc-crypttab-only-in-host-only-mode.patch new file mode 100644 index 0000000..aa9ab17 --- /dev/null +++ b/0048-crypt-install-etc-crypttab-only-in-host-only-mode.patch @@ -0,0 +1,22 @@ +From 3d12d7a2cc5d4fc76ac87514dae2ab27bac8208c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 24 Sep 2012 13:15:08 +0200 +Subject: [PATCH] crypt: install /etc/crypttab only in host-only mode + +--- + modules.d/90crypt/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index 485cbe0..5c1c71b 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -47,7 +47,7 @@ install() { + inst_hook cmdline 10 "$moddir/parse-keydev.sh" + inst_hook cmdline 30 "$moddir/parse-crypt.sh" + inst_hook cleanup 30 "$moddir/crypt-cleanup.sh" +- inst_simple /etc/crypttab ++ [[ $hostonly ]] && inst_simple /etc/crypttab + inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" + + dracut_install -o \ diff --git a/0049-udev-rules-module-setup.sh-add-udev-groups.patch b/0049-udev-rules-module-setup.sh-add-udev-groups.patch new file mode 100644 index 0000000..2dff8ac --- /dev/null +++ b/0049-udev-rules-module-setup.sh-add-udev-groups.patch @@ -0,0 +1,35 @@ +From 500d8e600291b69204c67e84282ff0cd90d2f80d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 24 Sep 2012 13:30:46 +0200 +Subject: [PATCH] udev-rules/module-setup.sh: add udev groups + +--- + modules.d/95udev-rules/module-setup.sh | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index 5e1cce5..00f9923 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -37,6 +37,21 @@ install() { + inst_dir /run/udev + inst_dir /run/udev/rules.d + ++ { ++ for i in cdrom tape dialout floppy; do ++ if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then ++ if ! egrep "^$i:" /etc/group 2>/dev/null; then ++ case $i in ++ cdrom) echo "$i:x:11:";; ++ dialout) echo "$i:x:18:";; ++ floppy) echo "$i:x:19:";; ++ tape) echo "$i:x:33:";; ++ esac ++ fi ++ fi ++ done ++ } >> "$initdir/etc/group" ++ + dracut_install -o \ + ${udevdir}/ata_id \ + ${udevdir}/cdrom_id \ diff --git a/0050-TEST-03-USR-MOUNT-create-root.sh-load-btrfs-module-m.patch b/0050-TEST-03-USR-MOUNT-create-root.sh-load-btrfs-module-m.patch new file mode 100644 index 0000000..330faf1 --- /dev/null +++ b/0050-TEST-03-USR-MOUNT-create-root.sh-load-btrfs-module-m.patch @@ -0,0 +1,22 @@ +From 907f75447ba189db0f7b9e88b14e90876037db72 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 24 Sep 2012 13:56:21 +0200 +Subject: [PATCH] TEST-03-USR-MOUNT/create-root.sh: load btrfs module manually + +--- + test/TEST-03-USR-MOUNT/create-root.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-03-USR-MOUNT/create-root.sh b/test/TEST-03-USR-MOUNT/create-root.sh +index 9a3e561..a9640eb 100755 +--- a/test/TEST-03-USR-MOUNT/create-root.sh ++++ b/test/TEST-03-USR-MOUNT/create-root.sh +@@ -17,7 +17,7 @@ sfdisk -C 5120 -H 2 -S 32 -L /dev/sdb < +Date: Mon, 24 Sep 2012 13:59:03 +0200 +Subject: [PATCH] TEST-10-RAID/test.sh: add "rd.auto=1" + +--- + test/TEST-10-RAID/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index 92f4dd8..8e5b9e5 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -11,7 +11,7 @@ test_run() { + -hda $DISKIMAGE \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rd.auto=1 rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 + } diff --git a/0052-i18n-10-console.rules-do-the-console-init-only-one-t.patch b/0052-i18n-10-console.rules-do-the-console-init-only-one-t.patch new file mode 100644 index 0000000..5929669 --- /dev/null +++ b/0052-i18n-10-console.rules-do-the-console-init-only-one-t.patch @@ -0,0 +1,17 @@ +From a0508937fc0d4fecf693301cca0ffe9e82ebb944 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 24 Sep 2012 15:12:20 +0200 +Subject: [PATCH] i18n/10-console.rules: do the console init only one time + +--- + modules.d/10i18n/10-console.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/10i18n/10-console.rules b/modules.d/10i18n/10-console.rules +index 385dff0..640b1db 100644 +--- a/modules.d/10i18n/10-console.rules ++++ b/modules.d/10i18n/10-console.rules +@@ -1,2 +1,2 @@ + # Console initialization - keyboard, font, etc. +-KERNEL=="tty0", RUN+="/sbin/initqueue --unique --name console_init_$name /lib/udev/console_init $root/$name" ++KERNEL=="tty0", RUN+="/sbin/initqueue --onetime --unique --name console_init_$name /lib/udev/console_init $root/$name" diff --git a/0053-url-lib-module-setup.sh-also-install-libs-for-https.patch b/0053-url-lib-module-setup.sh-also-install-libs-for-https.patch new file mode 100644 index 0000000..0f586d2 --- /dev/null +++ b/0053-url-lib-module-setup.sh-also-install-libs-for-https.patch @@ -0,0 +1,26 @@ +From 17b01c5b13a0b33ad610c2e923c323f616ff7edc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 10:52:33 +0200 +Subject: [PATCH] url-lib/module-setup.sh: also install libs for https + +--- + modules.d/45url-lib/module-setup.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh +index ad8f55e..0fb3667 100755 +--- a/modules.d/45url-lib/module-setup.sh ++++ b/modules.d/45url-lib/module-setup.sh +@@ -14,6 +14,12 @@ depends() { + install() { + inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh" + dracut_install curl ++ # also install libs for curl https ++ inst_libdir_file "libnsspem.so*" ++ inst_libdir_file "libnsssysinit.so*" ++ inst_libdir_file "libsoftokn3.so*" ++ inst_libdir_file "libsqlite3.so*" ++ + mkdir -m 0755 -p "$initdir/etc/ssl/certs" + if ! inst_any -t /etc/ssl/certs/ca-bundle.crt \ + /etc/ssl/certs/ca-bundle.crt \ diff --git a/0054-busybox-fix-installation-from-sbin-busybox.patch b/0054-busybox-fix-installation-from-sbin-busybox.patch new file mode 100644 index 0000000..8952cee --- /dev/null +++ b/0054-busybox-fix-installation-from-sbin-busybox.patch @@ -0,0 +1,31 @@ +From 69eba8c40a5e34569ae67f8970cc72b28b8d8a72 Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Tue, 25 Sep 2012 18:42:28 -0400 +Subject: [PATCH] busybox: fix installation from /sbin/busybox + +"inst busybox" no longer seems to work when busybox is at +/sbin/busybox. Reproduced on Fedora 18 (dracut-023-39.git20120910). + +Use type -P to find the full path to busybox to solve this problem. +--- + modules.d/05busybox/module-setup.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh +index 2e9ead8..e0ef178 100755 +--- a/modules.d/05busybox/module-setup.sh ++++ b/modules.d/05busybox/module-setup.sh +@@ -13,9 +13,10 @@ depends() { + } + + install() { +- local _i _progs _path +- inst busybox /usr/bin/busybox +- for _i in `/sbin/busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}'` ++ local _i _progs _path _busybox ++ _busybox=$(type -P busybox) ++ inst $_busybox /usr/bin/busybox ++ for _i in `$_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}'` + do + _progs="$_progs $_i" + done diff --git a/0055-busybox-module-setup.sh-generate-nice-relative-symli.patch b/0055-busybox-module-setup.sh-generate-nice-relative-symli.patch new file mode 100644 index 0000000..e218cb6 --- /dev/null +++ b/0055-busybox-module-setup.sh-generate-nice-relative-symli.patch @@ -0,0 +1,36 @@ +From 2cae00be9ec7a9ba8538e24d53236a8baa34c93f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 11:34:00 +0200 +Subject: [PATCH] busybox/module-setup.sh: generate nice relative symlinks + with ln_r + +--- + modules.d/05busybox/module-setup.sh | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh +index e0ef178..edcc8da 100755 +--- a/modules.d/05busybox/module-setup.sh ++++ b/modules.d/05busybox/module-setup.sh +@@ -16,7 +16,7 @@ install() { + local _i _progs _path _busybox + _busybox=$(type -P busybox) + inst $_busybox /usr/bin/busybox +- for _i in `$_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}'` ++ for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}') + do + _progs="$_progs $_i" + done +@@ -27,11 +27,7 @@ install() { + for _i in $_progs; do + _path=$(find_binary "$_i") + [ -z "$_path" ] && continue +- if [[ $_path != ${_path#/usr} ]]; then +- ln -sf ../../usr/bin/busybox "$initdir/$_path" +- else +- ln -sf ../usr/bin/busybox "$initdir/$_path" +- fi ++ ln_r /usr/bin/busybox $_path + done + } + diff --git a/0056-install-dracut-install.c-support-find_binary-for-src.patch b/0056-install-dracut-install.c-support-find_binary-for-src.patch new file mode 100644 index 0000000..040b2ef --- /dev/null +++ b/0056-install-dracut-install.c-support-find_binary-for-src.patch @@ -0,0 +1,168 @@ +From 868eba13f237dda70d98b00e754d6f337f6327b6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 11:34:38 +0200 +Subject: [PATCH] install/dracut-install.c: support find_binary for + + +also factor out find_binary() +--- + install/dracut-install.c | 127 +++++++++++++++++++++++++++++++---------------- + 1 file changed, 83 insertions(+), 44 deletions(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index f06f5ac..60a62e8 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -666,6 +666,81 @@ static int resolve_lazy(int argc, char **argv) + return ret; + } + ++static char *find_binary(const char *src) ++{ ++ char *path; ++ char *p, *q; ++ bool end = false; ++ char *newsrc = NULL; ++ path = getenv("PATH"); ++ ++ if (path == NULL) { ++ log_error("PATH is not set"); ++ exit(EXIT_FAILURE); ++ } ++ path = strdup(path); ++ p = path; ++ log_debug("PATH=%s", path); ++ ++ do { ++ struct stat sb; ++ ++ for (q = p; *q && *q != ':'; q++) ; ++ ++ if (*q == '\0') ++ end = true; ++ else ++ *q = '\0'; ++ ++ asprintf(&newsrc, "%s/%s", p, src); ++ p = q + 1; ++ ++ if (stat(newsrc, &sb) != 0) { ++ log_debug("stat(%s) != 0", newsrc); ++ free(newsrc); ++ newsrc = NULL; ++ continue; ++ } ++ ++ end = true; ++ ++ } while (!end); ++ ++ free(path); ++ if (newsrc) ++ log_debug("find_binary(%s) == %s", src, newsrc); ++ return newsrc; ++} ++ ++static int install_one(const char *src, const char *dst) ++{ ++ int r = 0; ++ int ret; ++ ++ if (strchr(src, '/') == NULL) { ++ char *newsrc = find_binary(src); ++ if (newsrc) { ++ log_debug("dracut_install '%s' '%s'", newsrc, dst); ++ ret = dracut_install(newsrc, dst, arg_createdir, arg_resolvedeps, true); ++ if (ret == 0) { ++ log_debug("dracut_install '%s' '%s' OK", newsrc, dst); ++ } ++ free(newsrc); ++ } else { ++ ret = -1; ++ } ++ } else { ++ ret = dracut_install(src, dst, arg_createdir, arg_resolvedeps, true); ++ } ++ ++ if ((ret != 0) && (!arg_optional)) { ++ log_error("ERROR: installing '%s' to '%s'", src, dst); ++ r = EXIT_FAILURE; ++ } ++ ++ return r; ++} ++ + static int install_all(int argc, char **argv) + { + int r = 0; +@@ -675,50 +750,18 @@ static int install_all(int argc, char **argv) + log_debug("Handle '%s'", argv[i]); + + if (strchr(argv[i], '/') == NULL) { +- char *path; +- char *p, *q; +- bool end = false; +- path = getenv("PATH"); +- if (path == NULL) { +- log_error("PATH is not set"); +- exit(EXIT_FAILURE); +- } +- path = strdup(path); +- p = path; +- log_debug("PATH=%s", path); +- do { +- char *newsrc = NULL; +- char *dest; +- struct stat sb; +- +- for (q = p; *q && *q != ':'; q++) ; +- +- if (*q == '\0') +- end = true; +- else +- *q = '\0'; +- +- asprintf(&newsrc, "%s/%s", p, argv[i]); +- p = q + 1; +- +- if (stat(newsrc, &sb) != 0) { +- free(newsrc); +- ret = -1; +- continue; +- } +- +- dest = strdup(newsrc); +- ++ char *newsrc = find_binary(argv[i]); ++ if (newsrc) { + log_debug("dracut_install '%s'", newsrc); +- ret = dracut_install(newsrc, dest, arg_createdir, arg_resolvedeps, true); ++ ret = dracut_install(newsrc, newsrc, arg_createdir, arg_resolvedeps, true); + if (ret == 0) { +- end = true; + log_debug("dracut_install '%s' OK", newsrc); + } + free(newsrc); +- free(dest); +- } while (!end); +- free(path); ++ } else { ++ ret = -1; ++ } ++ + } else { + char *dest = strdup(argv[i]); + ret = dracut_install(argv[i], dest, arg_createdir, arg_resolvedeps, true); +@@ -805,11 +848,7 @@ int main(int argc, char **argv) + r = install_all(argc - optind, &argv[optind]); + } else { + /* simple "inst src dst" */ +- r = dracut_install(argv[optind], argv[optind + 1], arg_createdir, arg_resolvedeps, true); +- if ((r != 0) && (!arg_optional)) { +- log_error("ERROR: installing '%s' to '%s'", argv[optind], argv[optind + 1]); +- r = EXIT_FAILURE; +- } ++ r = install_one(argv[optind], argv[optind + 1]); + } + + if (arg_optional) diff --git a/0057-dracut.cmdline.7.asc-fixed-rd.luks.allow-discards-fo.patch b/0057-dracut.cmdline.7.asc-fixed-rd.luks.allow-discards-fo.patch new file mode 100644 index 0000000..c0c2fda --- /dev/null +++ b/0057-dracut.cmdline.7.asc-fixed-rd.luks.allow-discards-fo.patch @@ -0,0 +1,22 @@ +From f7235c223dcdfdfa345ed63c156165840e66b068 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 11:48:41 +0200 +Subject: [PATCH] dracut.cmdline.7.asc: fixed rd.luks.allow-discards format + +--- + dracut.cmdline.7.asc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index c376d79..910006d 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -219,7 +219,7 @@ crypto LUKS + LUKS UUID, so you don't have to specify the full UUID. + This parameter can be specified multiple times. + +-**rd.luks.allow-discards:: ++**rd.luks.allow-discards**:: + Allow using of discards (TRIM) requests on all LUKS partitions. + + **rd.luks.crypttab=0**:: diff --git a/0058-crypt-crypt-run-generator.sh-add-allow-discards-to-o.patch b/0058-crypt-crypt-run-generator.sh-add-allow-discards-to-o.patch new file mode 100644 index 0000000..b95d8b4 --- /dev/null +++ b/0058-crypt-crypt-run-generator.sh-add-allow-discards-to-o.patch @@ -0,0 +1,34 @@ +From 372202007163a3294f3198dfb0eb9882e89b6e0e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 11:49:28 +0200 +Subject: [PATCH] crypt/crypt-run-generator.sh: add allow-discards to options + in crypttab + +--- + modules.d/90crypt/crypt-run-generator.sh | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh +index 224e511..3264b29 100755 +--- a/modules.d/90crypt/crypt-run-generator.sh ++++ b/modules.d/90crypt/crypt-run-generator.sh +@@ -11,7 +11,18 @@ if [ -f /etc/crypttab ]; then + done < /etc/crypttab + fi + +-echo "$luks $dev" >> /etc/crypttab ++# parse for allow-discards ++if strstr "$(cryptsetup --help)" "allow-discards"; then ++ if discarduuids=$(getargs "rd.luks.allow-discards"); then ++ if strstr " $discarduuids " " ${luks##luks-}"; then ++ allowdiscards="allow-discards" ++ fi ++ elif getargbool rd.luks.allow-discards; then ++ allowdiscards="allow-discards" ++ fi ++fi ++ ++echo "$luks $dev none $allowdiscards" >> /etc/crypttab + systemctl daemon-reload + systemctl start cryptsetup.target + exit 0 diff --git a/0059-TEST-16-DMSQUASH-reenable-test.patch b/0059-TEST-16-DMSQUASH-reenable-test.patch new file mode 100644 index 0000000..013ba81 --- /dev/null +++ b/0059-TEST-16-DMSQUASH-reenable-test.patch @@ -0,0 +1,22 @@ +From 7f1d77d9fb27f678f50aa6ad1baac7d28e8e4f5f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 11:58:51 +0200 +Subject: [PATCH] TEST-16-DMSQUASH: reenable test + +--- + test/TEST-16-DMSQUASH/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 4dc133c..9c4f356 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -11,7 +11,7 @@ test_check() { + echo "python-imgcreate not installed" + return 1 + fi +- return 1 ++ return 0 + } + + test_run() { diff --git a/0060-dm-module-setup.sh-instmods-dm_mod.patch b/0060-dm-module-setup.sh-instmods-dm_mod.patch new file mode 100644 index 0000000..4d32996 --- /dev/null +++ b/0060-dm-module-setup.sh-instmods-dm_mod.patch @@ -0,0 +1,21 @@ +From 194e074764756a2ee4d7164aa422dddae51b3576 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Sep 2012 15:05:34 +0200 +Subject: [PATCH] dm/module-setup.sh: instmods dm_mod + +--- + modules.d/90dm/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh +index 8bc2ea4..6ec9af4 100755 +--- a/modules.d/90dm/module-setup.sh ++++ b/modules.d/90dm/module-setup.sh +@@ -13,6 +13,7 @@ depends() { + + installkernel() { + instmods =drivers/md ++ instmods dm_mod + } + + install() { diff --git a/0061-dracut.sh-create-the-initramfs-non-world-readable.patch b/0061-dracut.sh-create-the-initramfs-non-world-readable.patch new file mode 100644 index 0000000..0354d86 --- /dev/null +++ b/0061-dracut.sh-create-the-initramfs-non-world-readable.patch @@ -0,0 +1,24 @@ +From e1b48995c26c4f06d1a718539cb1bd5b0179af91 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 27 Sep 2012 10:18:29 +0200 +Subject: [PATCH] dracut.sh: create the initramfs non-world readable + +--- + dracut.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 7148d0f..96faa06 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1033,8 +1033,9 @@ if [[ $do_hardlink = yes ]] ; then + } + fi + ++rm -f "$outfile" + dinfo "*** Creating image file ***" +-if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ ++if ! ( umask 077; cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ + $compress > "$outfile"; ); then + dfatal "dracut: creation of $outfile failed" + exit 1 diff --git a/0062-network-ifup.sh-setup-nameserver-for-every-interface.patch b/0062-network-ifup.sh-setup-nameserver-for-every-interface.patch new file mode 100644 index 0000000..4963521 --- /dev/null +++ b/0062-network-ifup.sh-setup-nameserver-for-every-interface.patch @@ -0,0 +1,59 @@ +From a0be1eddcf8cfc74d3475965f4bba351653870a8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 27 Sep 2012 11:52:27 +0200 +Subject: [PATCH] network/ifup.sh: setup nameserver for every interface + +even for dhcp + +https://bugzilla.redhat.com/show_bug.cgi?id=840769 +--- + modules.d/40network/ifup.sh | 22 ++++++++-------------- + 1 file changed, 8 insertions(+), 14 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 316a21a..95289c9 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -88,13 +88,6 @@ do_ipv6auto() { + wait_for_if_up $netif + + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname +- +- namesrv=$(getargs nameserver) +- if [ -n "$namesrv" ] ; then +- for s in $namesrv; do +- echo nameserver $s +- done +- fi >> /tmp/net.$netif.resolv.conf + } + + # Handle static ip configuration +@@ -115,13 +108,6 @@ do_static() { + + [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname +- +- namesrv=$(getargs nameserver) +- if [ -n "$namesrv" ] ; then +- for s in $namesrv; do +- echo nameserver $s +- done +- fi >> /tmp/net.$netif.resolv.conf + } + + # loopback is always handled the same way +@@ -220,6 +206,14 @@ if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then + ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname; echo $?)" + fi + ++# setup nameserver ++namesrv=$(getargs nameserver) ++if [ -n "$namesrv" ] ; then ++ for s in $namesrv; do ++ echo nameserver $s ++ done ++fi >> /tmp/net.$netif.resolv.conf ++ + # No ip lines default to dhcp + ip=$(getarg ip) + diff --git a/0063-shutdown-shutdown.sh-reboot-if-no-argument-was-given.patch b/0063-shutdown-shutdown.sh-reboot-if-no-argument-was-given.patch new file mode 100644 index 0000000..2d375a0 --- /dev/null +++ b/0063-shutdown-shutdown.sh-reboot-if-no-argument-was-given.patch @@ -0,0 +1,54 @@ +From d65638dacb57aaa681f05b63b3ea49cef9f80d2f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 27 Sep 2012 12:10:14 +0200 +Subject: [PATCH] shutdown/shutdown.sh: reboot, if no argument was given + +--- + modules.d/99shutdown/shutdown.sh | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh +index e1da91b..74b6be8 100755 +--- a/modules.d/99shutdown/shutdown.sh ++++ b/modules.d/99shutdown/shutdown.sh +@@ -6,6 +6,7 @@ + # + # Copyright 2011, Red Hat, Inc. + # Harald Hoyer ++ACTION="$1" + + export TERM=linux + export PATH=/usr/sbin:/usr/bin:/sbin:/bin +@@ -40,8 +41,8 @@ _check_shutdown() { + local __s=1 + for __f in $hookdir/shutdown/*.sh; do + [ -e "$__f" ] || continue +- ( . "$__f" $1 ) +- if [ $? -eq 0 ]; then ++ ( . "$__f" $1 ) ++ if [ $? -eq 0 ]; then + rm -f $__f + __s=0 + fi +@@ -49,14 +50,16 @@ _check_shutdown() { + return $__s + } + +-_cnt=0 + while _check_shutdown; do + : + done + _check_shutdown final + + getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown" +-[ "$1" = "reboot" ] && reboot -f -d -n +-[ "$1" = "poweroff" ] && poweroff -f -d -n +-[ "$1" = "halt" ] && halt -f -d -n +-[ "$1" = "kexec" ] && kexec -e ++[ "$ACTION" = "reboot" ] && reboot -f -d -n ++[ "$ACTION" = "poweroff" ] && poweroff -f -d -n ++[ "$ACTION" = "halt" ] && halt -f -d -n ++[ "$ACTION" = "kexec" ] && kexec -e ++ ++warn "Shutdown called without an argument. Rebooting!" ++reboot -f -d -n diff --git a/0064-TODO-update.patch b/0064-TODO-update.patch new file mode 100644 index 0000000..2c2c85b --- /dev/null +++ b/0064-TODO-update.patch @@ -0,0 +1,27 @@ +From 69ba546721d9faee2a29498df4c6ec6676a30c5c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 27 Sep 2012 12:28:46 +0200 +Subject: [PATCH] TODO: update + +--- + TODO | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/TODO b/TODO +index 9481df7..84939ab 100644 +--- a/TODO ++++ b/TODO +@@ -14,6 +14,13 @@ INITRAMFS TODO + - put mount hook in main initqueue loop / careful about resume! + - the hard-coded list of udev rules that we care about is kind of lame. + - panic fallback ++- bridging/bonding without "netroot=" https://bugzilla.redhat.com/show_bug.cgi?id=822750 ++- progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118 ++- domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778 ++- disable write-ifcfg https://bugzilla.redhat.com/show_bug.cgi?id=840784 ++- check for /var to be mounted in convertfs https://bugzilla.redhat.com/show_bug.cgi?id=848172 ++- probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338 ++- iscsi livecd boot + + GENERATOR TODO + diff --git a/dracut.spec b/dracut.spec index 84661a2..4dd1cc2 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 023 -Release: 39.git20120910%{?dist} +Release: 65.git20120927%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -67,6 +67,32 @@ Patch35: 0035-apply-live-updates.sh-handle-updates-for-run.patch Patch36: 0036-iscsi-parse-iscsiroot.sh-delay-loading-of-iscsi-modu.patch Patch37: 0037-nfs-install-all-nfs-submodules.patch Patch38: 0038-move-get_persistent_dev-to-dracut-functions.sh.patch +Patch39: 0039-resume-resume.sh-prevent-resume-not-found.patch +Patch40: 0040-bye-bye-iscsi_wait_scan-.-officially-gone-for-kernel.patch +Patch41: 0041-45url-lib-url-lib.sh-give-info-what-URL-curl-failed-.patch +Patch42: 0042-ismounted-fix.patch +Patch43: 0043-dash-compat-use-2-1-rather-than.patch +Patch44: 0044-fallback-to-old-ismounted-if-findmnt-is-not-installe.patch +Patch45: 0045-dracut-logger.sh-don-t-check-for-lvl-0-in-dlog_init.patch +Patch46: 0046-use-by-uuid-firstly-in-get_persistent_dev.patch +Patch47: 0047-systemd-initrd-switch-root.target-run-switch-root.ta.patch +Patch48: 0048-crypt-install-etc-crypttab-only-in-host-only-mode.patch +Patch49: 0049-udev-rules-module-setup.sh-add-udev-groups.patch +Patch50: 0050-TEST-03-USR-MOUNT-create-root.sh-load-btrfs-module-m.patch +Patch51: 0051-TEST-10-RAID-test.sh-add-rd.auto-1.patch +Patch52: 0052-i18n-10-console.rules-do-the-console-init-only-one-t.patch +Patch53: 0053-url-lib-module-setup.sh-also-install-libs-for-https.patch +Patch54: 0054-busybox-fix-installation-from-sbin-busybox.patch +Patch55: 0055-busybox-module-setup.sh-generate-nice-relative-symli.patch +Patch56: 0056-install-dracut-install.c-support-find_binary-for-src.patch +Patch57: 0057-dracut.cmdline.7.asc-fixed-rd.luks.allow-discards-fo.patch +Patch58: 0058-crypt-crypt-run-generator.sh-add-allow-discards-to-o.patch +Patch59: 0059-TEST-16-DMSQUASH-reenable-test.patch +Patch60: 0060-dm-module-setup.sh-instmods-dm_mod.patch +Patch61: 0061-dracut.sh-create-the-initramfs-non-world-readable.patch +Patch62: 0062-network-ifup.sh-setup-nameserver-for-every-interface.patch +Patch63: 0063-shutdown-shutdown.sh-reboot-if-no-argument-was-given.patch +Patch64: 0064-TODO-update.patch BuildRequires: dash bash git @@ -400,6 +426,20 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Thu Sep 27 2012 Harald Hoyer 023-65.git20120927 +- no more iscsi_wait_scan +- curl: give info what URL failed, support https +- use findmnt +- systemd: wait for cryptroot +- only install crypttab in host-only mode +- add udev groups +- fixed busybox install +- fixed rd.luks.allow-discards manpage and handling +- force install dm_mod +- do not create the initramfs world reabable +- add nameserver even for dhcp +- fallback to reboot if shutdown was called without a parameter + * Mon Sep 10 2012 Harald Hoyer 023-39.git20120910 - fixed FIPS - nbd port fix