mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Seewer Philippe <philippe.seewer-omB+W0Dpw2o@public.gmane.org>
To: "initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 8/8] Move netroot to initqueue
Date: Thu, 17 Sep 2009 17:30:23 +0200	[thread overview]
Message-ID: <4AB2560F.40505@bfh.ch> (raw)
In-Reply-To: <1253200609-31629-9-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>

On irc harald pointed out that we might get rid of the online
event completely and schedule netroot for the initqueue inside
ifup and dhclient. That is much better.
---
 modules.d/40network/dhclient-script |    2 +-
 modules.d/40network/ifup            |    2 +-
 modules.d/40network/net-genrules.sh |    4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script
index b03cf1c..d6c1448 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -73,7 +73,7 @@ case $reason in
 	    [ "${line#new_}" = "$line" ] && continue
 	    echo "$line" 
 	done >/tmp/dhclient.$netif.dhcpopts
-	echo online > /sys/class/net/$netif/uevent
+	/sbin/initqueue --onetime /sbin/netroot $netif
 	;;
     *) ;;
 esac
diff --git a/modules.d/40network/ifup b/modules.d/40network/ifup
index 25cab26..5002774 100755
--- a/modules.d/40network/ifup
+++ b/modules.d/40network/ifup
@@ -42,7 +42,7 @@ 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
 
-    echo online > /sys/class/net/$netif/uevent
+    /sbin/initqueue --onetime /sbin/netroot $netif
 }
 
 PATH=$PATH:/sbin:/usr/sbin
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index ba369cc..c213a28 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -36,8 +36,4 @@ fix_bootif() {
     else
 	printf 'ACTION=="add", SUBSYSTEM=="net", RUN+="/sbin/ifup $env{INTERFACE}"\n'
     fi
-
-    # Udev event 'online' only gets fired from ifup/dhclient-script.
-    # No special rules required
-    printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/netroot $env{INTERFACE}"\n'
 } > /etc/udev/rules.d/60-net.rules
-- 
1.6.0.4


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-09-17 15:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 15:16 [PATCH 0/8] Netroot updates and multinic test-suite Philippe Seewer
     [not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
2009-09-17 15:16   ` [PATCH 1/8] Give the kernel some time to up interfaces Philippe Seewer
2009-09-17 15:16   ` [PATCH 2/8] Be a bit more optimistic when setting mtus Philippe Seewer
2009-09-17 15:16   ` [PATCH 3/8] Get rid of hostname utility Philippe Seewer
2009-09-17 15:16   ` [PATCH 4/8] Add simple STP timeout handler Philippe Seewer
2009-09-17 15:16   ` [PATCH 5/8] Add DAD to dhclient-script Philippe Seewer
2009-09-17 15:16   ` [PATCH 6/8] Add multinic test suite Philippe Seewer
2009-09-17 15:16   ` [PATCH 7/8] Move write-ifcfg to its own module Philippe Seewer
2009-09-17 15:16   ` [PATCH 8/8] Move netroot to initqueue Philippe Seewer
     [not found]     ` <1253200609-31629-9-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
2009-09-17 15:30       ` Seewer Philippe [this message]
2009-10-07 14:50   ` [PATCH 0/8] Netroot updates and multinic test-suite Harald Hoyer
     [not found]     ` <4ACCAAAA.7070003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-10-07 16:53       ` Warren Togami
     [not found]         ` <4ACCC79A.2000602-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-10-07 16:57           ` Harald Hoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AB2560F.40505@bfh.ch \
    --to=philippe.seewer-omb+w0dpw2o@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox