From 650a106cbf1a269b8116735ca4f86a62e474bd96 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Jul 31 2013 14:13:33 +0000 Subject: dracut-031-3.git20130731 - do not include adjtime and localtime in the initramfs - write out vlan configs --- diff --git a/0001-Generate-correct-ifcfg-file-for-vlan-option.patch b/0001-Generate-correct-ifcfg-file-for-vlan-option.patch new file mode 100644 index 0000000..84a1d10 --- /dev/null +++ b/0001-Generate-correct-ifcfg-file-for-vlan-option.patch @@ -0,0 +1,59 @@ +From 030b00b8a5499a1d2150730ae412a356f40ca5a4 Mon Sep 17 00:00:00 2001 +From: Radek Vykydal +Date: Wed, 31 Jul 2013 15:18:20 +0200 +Subject: [PATCH] Generate correct ifcfg file for vlan= option. + +--- + modules.d/45ifcfg/write-ifcfg.sh | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 2e78c49..dcb2aef 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -9,6 +9,10 @@ if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info + fi + ++if [ -e /tmp/vlan.info ]; then ++ . /tmp/vlan.info ++fi ++ + mkdir -m 0755 -p /tmp/ifcfg/ + mkdir -m 0755 -p /tmp/ifcfg-leases/ + +@@ -103,6 +107,9 @@ for netup in /tmp/net.*.did-setup ; do + # $netif can't be bridge and bond at the same time + bond=yes + fi ++ if [ "$netif" = "$vlanname" ]; then ++ vlan=yes ++ fi + cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr + { + echo "# Generated by dracut initrd" +@@ -149,7 +156,7 @@ for netup in /tmp/net.*.did-setup ; do + } > /tmp/ifcfg/ifcfg-$netif + + # bridge needs different things written to ifcfg +- if [ -z "$bridge" ] && [ -z "$bond" ]; then ++ if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then + # standard interface + { + if [ -n "$macaddr" ]; then +@@ -164,6 +171,15 @@ for netup in /tmp/net.*.did-setup ; do + } >> /tmp/ifcfg/ifcfg-$netif + fi + ++ if [ -n "$vlan" ] ; then ++ { ++ echo "TYPE=Vlan" ++ echo "NAME=\"$netif\"" ++ echo "VLAN=yes" ++ echo "PHYSDEV=\"$phydevice\"" ++ } >> /tmp/ifcfg/ifcfg-$netif ++ fi ++ + if [ -n "$bond" ] ; then + # bond interface + { diff --git a/0002-Revert-base-setup-correct-system-time-and-time-zone-.patch b/0002-Revert-base-setup-correct-system-time-and-time-zone-.patch new file mode 100644 index 0000000..65c4dae --- /dev/null +++ b/0002-Revert-base-setup-correct-system-time-and-time-zone-.patch @@ -0,0 +1,58 @@ +From d27cd4dfdd51c7f5178c5f4cb8f5bf4668228995 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 31 Jul 2013 15:55:13 +0200 +Subject: [PATCH] Revert "base: setup correct system time and time zone in + initrd" + +This reverts commit 77364fd6bb01ea184db73b1a5ad05da984752293. + +Too many problems with adjtime in the initramfs + +https://bugzilla.redhat.com/show_bug.cgi?id=981617 +--- + modules.d/99base/init.sh | 9 --------- + modules.d/99base/module-setup.sh | 11 ----------- + 2 files changed, 20 deletions(-) + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index 0e4cac5..ae73fd2 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -48,15 +48,6 @@ if ! ismounted /dev; then + exit 1 + fi + +-# setup system time +-if [ -f /etc/adjtime ]; then +- if strstr "$(cat /etc/adjtime)" LOCAL; then +- hwclock --hctosys --localtime +- else +- hwclock --hctosys --utc +- fi +-fi +- + # prepare the /dev directory + [ ! -h /dev/fd ] && ln -s /proc/self/fd /dev/fd >/dev/null 2>&1 + [ ! -h /dev/stdin ] && ln -s /proc/self/fd/0 /dev/stdin >/dev/null 2>&1 +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index c9ee838..842dde6 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -29,17 +29,6 @@ install() { + egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd" + egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd" + +- # install /etc/adjtime and time zone data +- if [[ $hostonly ]]; then +- dracut_install -o /etc/adjtime \ +- /etc/localtime +- +- # Our init.sh script needs hwclock to set system time +- if ! dracut_module_included "systemd"; then +- dracut_install -o hwclock +- fi +- fi +- + # install our scripts and hooks + inst_script "$moddir/init.sh" "/init" + inst_script "$moddir/initqueue.sh" "/sbin/initqueue" diff --git a/dracut.spec b/dracut.spec index 5b3c130..baf9155 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 031 -Release: 1%{?dist} +Release: 3.git20130731%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -29,6 +29,9 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 +Patch1: 0001-Generate-correct-ifcfg-file-for-vlan-option.patch +Patch2: 0002-Revert-base-setup-correct-system-time-and-time-zone-.patch + BuildRequires: bash git @@ -443,6 +446,10 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Wed Jul 31 2013 Harald Hoyer 031-3.git20130731 +- do not include adjtime and localtime in the initramfs +- write out vlan configs + * Wed Jul 31 2013 Harald Hoyer 031-1 - do not include the resume dracut module in hostonly mode, if no swap is present