Fix ifup.sh to always execute initqueue/online hook after bringing up an interface
PATCH 1/1 Fix ifup.sh to always execute initqueue/online hook after bringing up an interface
--- modules.d/40network/ifup.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)
modules.d/40network/ifup.sh +7 -13
@@ -307,19 +307,13 @@ for p in $(getargs ip=); do do_static ;; esac - 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 + if [ $? -eq 0 ]; then + setup_net $netif + source_hook initqueue/online $netif + if [ -z "$manualup" ]; then + /sbin/netroot $netif + fi + fi break done
Signature · 1 line
1.8.1.5
Am 11.04.2013 17:41, schrieb Dennis Schridde:
Quoted 26 lines
--- modules.d/40network/ifup.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)modules.d/40network/ifup.sh +0
-13@@ -307,19 +307,13 @@ for p in $(getargs ip=); do do_static ;; esac - 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
modules.d/40network/ifup.sh for p in $(getargs ip=); do · line 319
Quoted 10 lines
modules.d/40network/ifup.sh +7
-0+ if [ $? -eq 0 ]; then + setup_net $netif + source_hook initqueue/online $netif + if [ -z "$manualup" ]; then + /sbin/netroot $netif + fi + fi break done
IIRC, that is done, as soon as the dhcp client gets an IP
Hello!
This fix is required for net_add_parse_vars in my "[PATCH 1/2] [40network] Add variable parsing framework for network related variables" to work properly.
The online hook was previously not executed for dhcp enabled interfaces, which resulted in my code not being executed.
--Dennis
Am Donnerstag, 11. April 2013, 17:44:08 schrieb Harald Hoyer:
Quoted 1 line
IIRC, that is done, as soon as the dhcp client gets an IP
These patches are already a few months old, so dracut's behaviour may very well have changed in the meantime. Where does what you describe happen?
--Dennis
Quoted 2 lines · Dennis Schridde
Am Donnerstag, 11. April 2013, 17:44:08 schrieb Harald Hoyer:
Quoted 1 line
IIRC, that is done, as soon as the dhcp client gets an IP
Technically it doesn't happen *immediately* - it adds a job to the initqueue, and that job will run the initqueue/online hook.
Quoted 2 lines
These patches are already a few months old, so dracut's behaviour may very well have changed in the meantime. Where does what you describe happen?
See 40network/dhclient-script.sh - when $reason is BOUND (i.e. initial binding to a new address, as per dhclient-script(8)), it adds a job named "setup_net_$netif.sh" to the initqueue.
Hope that helps,
-w
Hello!
Am Dienstag, 30. April 2013, 15:25:15 schrieb Will Woods:
Quoted 7 lines · Dennis Schridde
Quoted 2 lines
Am Donnerstag, 11. April 2013, 17:44:08 schrieb Harald Hoyer:
Quoted 1 line
IIRC, that is done, as soon as the dhcp client gets an IP
Technically it doesn't happen *immediately* - it adds a job to the initqueue, and that job will run the initqueue/online hook.
Quoted 6 lines
Quoted 2 lines
These patches are already a few months old, so dracut's behaviour may very well have changed in the meantime. Where does what you describe happen?
See
40network/dhclient-script.sh- when $reason is BOUND (i.e. initial binding to a new address, as per dhclient-script(8)), it adds a job named "setup_net_$netif.sh" to the initqueue.
Thanks for that information!
I removed the patch and discovered some bugs and misconceptions about the inner workings of dracut in my own code. It works now without the patch.
Best regards,
Dennis