Some tiny fixes
Hi,
would be great if these can be applied in the mainline dracut git tree.
Thanks,
Thomas
A message that is not in the archive (sent off-list or not yet received): 1427127138-12932-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org
PATCH 1/4 Correct paths for openSUSE
From: Christian Rodrigues <[email protected]>
openSUSE has things stored in different places, so fixup the paths here.
--- dracut.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dracut.sh +1 -1
@@ -809,7 +809,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l [[ $lvmconf_l ]] && lvmconf=$lvmconf_l [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut -[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" +[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware /lib/firmware/$kernel" [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" [[ $tmpdir ]] || tmpdir=/var/tmp [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
Signature · 1 line
2.1.4
A message that is not in the archive (sent off-list or not yet received): 1427127138-12932-2-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org
Re: [PATCH 1/4] Correct paths for openSUSE
Quoted 18 lines · Thomas Renninger
From: Christian Rodrigues <[email protected]>
openSUSE has things stored in different places, so fixup the paths here.
Signed-off-by Christian Rodrigues <[email protected]>Signed-off-by Hannes Reinecke <[email protected]>Signed-off-by Thomas Renninger <[email protected]>--- dracut.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)dracut.sh +0
-0
dracut.sh stdloglvl=$((stdloglvl + verbosity_mod_l)) · line 815
Quoted 8 lines
dracut.sh +1
-1@@ -809,7 +809,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l [[ $lvmconf_l ]] && lvmconf=$lvmconf_l [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut -[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" +[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware /lib/firmware/$kernel" [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" [[ $tmpdir ]] || tmpdir=/var/tmp [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
pushed, thanks
PATCH 2/4 40network: Fix race condition when wait for networks
In reply to a message not in the archiveFrom: Pawel Wieczorkiewicz <[email protected]>
If no network related params are specific, but rd.neednet=1 is set, the default initqueue action is to wait until one of the network interfaces is marked as setup properly.
This also help with initqueue's race condition when the network interface shows upd late
References: bnc#866771
--- modules.d/40network/net-genrules.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
modules.d/40network/net-genrules.sh +4 -1
@@ -95,7 +95,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh else cond='ACTION=="add", SUBSYSTEM=="net"' # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh - echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules + if [ "$NEEDNET" = "1" ]; then + echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules + echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh + fi fi # if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh
Signature · 1 line
2.1.4
A message that is not in the archive (sent off-list or not yet received): 1427127138-12932-3-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org
Re: [PATCH 2/4] 40network: Fix race condition when wait for networks
Quoted 22 lines · Thomas Renninger
From: Pawel Wieczorkiewicz <[email protected]>
If no network related params are specific, but rd.neednet=1 is set, the default initqueue action is to wait until one of the network interfaces is marked as setup properly.
This also help with initqueue's race condition when the network interface shows upd late
References: bnc#866771
Signed-off-by Hannes Reinecke <[email protected]>Signed-off-by Thomas Renninger <[email protected]>--- modules.d/40network/net-genrules.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)modules.d/40network/net-genrules.sh +0
-0
modules.d/40network/net-genrules.sh command -v fix_bootif >/dev/null || . /lib/net-lib.sh · line 100
Quoted 7 lines
modules.d/40network/net-genrules.sh +3
-1@@ -95,7 +95,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh else cond='ACTION=="add", SUBSYSTEM=="net"' # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh - echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules + if [ "$NEEDNET" = "1" ]; then + echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules + echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh
err, if multiple networks are up, [ -f /tmp/net.*.did-setup ] is not correct shell syntax.
$ [ -e /dev/* ] && echo OK bash: [: too many arguments
Quoted 5 lines
modules.d/40network/net-genrules.sh +1
-0+ fi fi # if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/4] 40network: Fix race condition when wait for networks
Quoted 9 lines · On Tue, 02 Jun 2015 12:15:26 +0200 Harald Hoyer…
Quoted 2 lines
+ echo "[ -f
/tmp/net.*.did-setup]"Quoted 1 line
$hookdir/initqueue/finished/wait-network.sherr, if multiple networks are up, [ -f
/tmp/net.*.did-setup] is not correct shell syntax.$ [ -e /dev/* ] && echo OK bash: [: too many arguments
Can this condition really occur?
Shouldn't we be done with the wait-network initqueue job condition just after 1st network is setup (the '*' here just means whatever interface is up, not multiple interfaces)?
AFAIR each network ifup request is a separate initqueue job and the condition is evaluated between jobs switches. So first created /tmp/net.*.did-setup, whatever interface it has, makes this condition be satisfied.
This way or another, it can be improved to the longer and more demanding multifiles variant (for file in /tmp/net.*.did-setup loop or set -- /tmp/net.*.did-setup and $# > 0 evaluation).
Signature · 6 lines
Best Regards, Pawel Wieczorkiewicz <[email protected]>, Linux System Developer SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 / 90409 Nürnberg / Germany / Phone: +49-911-740 53 - 613
PATCH 3/4 40network: always start netroot in ifup.sh
In reply to a message not in the archiveFrom: Hannes Reinecke <[email protected]>
It's totally irrelevant how the network is configured when trying to setup netroot. It only matters if it could be configured at all.
So change the logic the check for correct network setup and then start netroot.
References: bnc#881235
--- modules.d/40network/ifup.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-)
modules.d/40network/ifup.sh +8 -14
@@ -338,21 +338,15 @@ for p in $(getargs ip=); do esac done - > /tmp/net.${netif}.up + if [ $? -eq 0 ]; then + > /tmp/net.${netif}.up - case $autoconf in - dhcp|on|any|dhcp6) - ;; - *) - if [ $? -eq 0 ]; then - setup_net $netif - source_hook initqueue/online $netif - if [ -z "$manualup" ]; then - /sbin/netroot $netif - fi - fi - ;; - esac + setup_net $netif + source_hook initqueue/online $netif + if [ -z "$manualup" ]; then + /sbin/netroot $netif + fi + fi exit 0 done
Signature · 1 line
2.1.4
A message that is not in the archive (sent off-list or not yet received): 1427127138-12932-4-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org
Re: [PATCH 3/4] 40network: always start netroot in ifup.sh
Quoted 41 lines · Thomas Renninger
From: Hannes Reinecke <[email protected]>
It's totally irrelevant how the network is configured when trying to setup netroot. It only matters if it could be configured at all.
So change the logic the check for correct network setup and then start netroot.References: bnc#881235
Signed-off-by Hannes Reinecke <[email protected]>Signed-off-by Thomas Renninger <[email protected]>--- modules.d/40network/ifup.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-)modules.d/40network/ifup.sh +2
-13@@ -338,21 +338,15 @@ for p in $(getargs ip=); do esac done - > /tmp/net.${netif}.up + if [ $? -eq 0 ]; then + > /tmp/net.${netif}.up - case $autoconf in - dhcp|on|any|dhcp6) - ;; - *) - if [ $? -eq 0 ]; then - setup_net $netif - source_hook initqueue/online $netif - if [ -z "$manualup" ]; then - /sbin/netroot $netif - fi - fi - ;;
modules.d/40network/ifup.sh for p in $(getargs ip=); do · line 352
Quoted 10 lines
modules.d/40network/ifup.sh +6
-1- esac + setup_net $netif + source_hook initqueue/online $netif + if [ -z "$manualup" ]; then + /sbin/netroot $netif + fi + fi exit 0 done
Well, for dhcp, the dhclient-script.sh adds an initqueue script setup_net_$netif.sh, which does:
. /lib/net-lib.shsetup_net $netifsource_hook initqueue/online $netif/sbin/netroot $netif
PATCH 4/4 95fcoe-uefi: Test for EFI firmware
In reply to a message not in the archiveFrom: Hannes Reinecke <[email protected]>
The fcoe-uefi module should test for EFI firmware when called in 'hostonly' mode; of no EFI firmware is found then the module doesn't need to be included.
References: bnc#882412
--- modules.d/95fcoe-uefi/module-setup.sh | 3 +++ 1 file changed, 3 insertions(+)
modules.d/95fcoe-uefi/module-setup.sh +3 -0
@@ -2,6 +2,9 @@ # called by dracut check() { + [[ $hostonly ]] || [[ $mount_needs ]] && { + [ -d /sys/firmware/efi ] || return 255 + } require_binaries dcbtool fipvlan lldpad ip readlink || return 1 return 0 }
Signature · 1 line
2.1.4
A message that is not in the archive (sent off-list or not yet received): 1427127138-12932-5-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org
[Dracut GitHub] Patchset imported to github
Patchset imported to github.
Pull request:
<https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:[email protected]>
Re: [PATCH 4/4] 95fcoe-uefi: Test for EFI firmware
In reply to a message not in the archiveQuoted 20 lines · Thomas Renninger
From: Hannes Reinecke <[email protected]>
The fcoe-uefi module should test for EFI firmware when called in 'hostonly' mode; of no EFI firmware is found then the module doesn't need to be included.
References: bnc#882412
Signed-off-by Hannes Reinecke <[email protected]>Signed-off-by Thomas Renninger <[email protected]>--- modules.d/95fcoe-uefi/module-setup.sh | 3 +++ 1 file changed, 3 insertions(+)modules.d/95fcoe-uefi/module-setup.sh +0
-0
modules.d/95fcoe-uefi/module-setup.sh line 10
Quoted 9 lines
modules.d/95fcoe-uefi/module-setup.sh +3
-0@@ -2,6 +2,9 @@ # called by dracut check() { + [[ $hostonly ]] || [[ $mount_needs ]] && { + [ -d /sys/firmware/efi ] || return 255 + } require_binaries dcbtool fipvlan lldpad ip readlink || return 1 return 0 }
pushed, thanks