* [PATCH 0/8] Netroot updates and multinic test-suite
@ 2009-09-17 15:16 Philippe Seewer
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
A bit late, but this is the corrected updates to netroot I sent
a while ago, plus some new things that are needed.
Philippe Seewer (8):
Give the kernel some time to up interfaces
Be a bit more optimistic when setting mtus
Get rid of hostname utility
Add simple STP timeout handler
Add DAD to dhclient-script
Add multinic test suite
Move write-ifcfg to its own module
Move netroot to initqueue
modules.d/40network/check | 2 +-
modules.d/40network/dhclient-script | 24 +++-
modules.d/40network/ifup | 5 +-
modules.d/40network/install | 6 +-
modules.d/40network/net-genrules.sh | 2 +-
modules.d/40network/netroot | 23 ++++
modules.d/40network/write-ifcfg.sh | 52 --------
modules.d/45ifcfg/check | 6 +
modules.d/45ifcfg/install | 2 +
modules.d/45ifcfg/write-ifcfg.sh | 60 +++++++++
modules.d/99base/init | 11 +--
test/TEST-50-MULTINIC/Makefile | 10 ++
test/TEST-50-MULTINIC/client-init | 9 ++
test/TEST-50-MULTINIC/dhcpd.conf | 36 ++++++
test/TEST-50-MULTINIC/exports | 1 +
test/TEST-50-MULTINIC/hard-off.sh | 2 +
test/TEST-50-MULTINIC/hosts | 5 +
test/TEST-50-MULTINIC/server-init | 30 +++++
test/TEST-50-MULTINIC/test.sh | 226 +++++++++++++++++++++++++++++++++++
19 files changed, 436 insertions(+), 76 deletions(-)
delete mode 100755 modules.d/40network/write-ifcfg.sh
create mode 100755 modules.d/45ifcfg/check
create mode 100755 modules.d/45ifcfg/install
create mode 100755 modules.d/45ifcfg/write-ifcfg.sh
create mode 100644 test/TEST-50-MULTINIC/Makefile
create mode 100755 test/TEST-50-MULTINIC/client-init
create mode 100644 test/TEST-50-MULTINIC/dhcpd.conf
create mode 100644 test/TEST-50-MULTINIC/exports
create mode 100755 test/TEST-50-MULTINIC/hard-off.sh
create mode 100644 test/TEST-50-MULTINIC/hosts
create mode 100755 test/TEST-50-MULTINIC/server-init
create mode 100755 test/TEST-50-MULTINIC/test.sh
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/8] Give the kernel some time to up interfaces
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
@ 2009-09-17 15:16 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 2/8] Be a bit more optimistic when setting mtus Philippe Seewer
` (7 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
According to stock isc dhclient-script and other implementations
it is a good idea to wait a second after upping an interface to
let things settle.
---
modules.d/40network/dhclient-script | 2 ++
modules.d/40network/ifup | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script
index a866952..c7c73cc 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -52,6 +52,8 @@ netif=$interface
case $reason in
PREINIT)
ip link set $netif up
+ # Give the kernel some time to up the interface
+ sleep 1
;;
BOUND)
setup_interface
diff --git a/modules.d/40network/ifup b/modules.d/40network/ifup
index 37b78cd..ce39dcd 100755
--- a/modules.d/40network/ifup
+++ b/modules.d/40network/ifup
@@ -32,8 +32,9 @@ do_dhcp() {
# Handle static ip configuration
do_static() {
-{
+ {
echo ip link set $netif up
+ echo sleep 1
echo ip addr flush dev $netif
echo ip addr add $ip/$mask dev $netif
} > /tmp/net.$netif.up
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/8] Be a bit more optimistic when setting mtus
[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 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 3/8] Get rid of hostname utility Philippe Seewer
` (6 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
The usual approach to setting mtus is to set the interface down,
set the mtu then set the interface back up again. Modern hardware
and/or drivers may support setting this on the fly, so we try
this and fall back to the old behaviour it it doesn't work.
In addition this patch only allows mtus greater than 576, this is
taken from debian/ubuntu dhclient-script.
---
modules.d/40network/dhclient-script | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script
index c7c73cc..e3da4ea 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -13,10 +13,18 @@ setup_interface() {
[ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
- if [ -n "$mtu" ] ; then
- echo ip link set $netif down
- echo ip link set $netif mtu $mtu
- echo ip link set $netif up
+ # Taken from debian dhclient-script:
+ # The 576 MTU is only used for X.25 and dialup connections
+ # where the admin wants low latency. Such a low MTU can cause
+ # problems with UDP traffic, among other things. As such,
+ # disallow MTUs from 576 and below by default, so that broken
+ # MTUs are ignored, but higher stuff is allowed (1492, 1500, etc).
+ if [ -n "$mtu" ] && [ $mtu -gt 576 ] ; then
+ echo "if ! ip link set $netif mtu $mtu ; then"
+ echo "ip link set $netif down"
+ echo "ip link set $netif mtu $mtu"
+ echo "ip link set $netif up"
+ echo "fi"
fi > /tmp/net.$netif.up
echo ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif >> /tmp/net.$netif.up
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/8] Get rid of hostname utility
[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 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 4/8] Add simple STP timeout handler Philippe Seewer
` (5 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
dracut doesn't really need a utility to set the hostname. It only
saves a few ks of space, but every bit is good.
---
modules.d/40network/check | 2 +-
modules.d/40network/dhclient-script | 2 +-
modules.d/40network/ifup | 2 +-
modules.d/40network/install | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules.d/40network/check b/modules.d/40network/check
index f2b137c..cf06c74 100755
--- a/modules.d/40network/check
+++ b/modules.d/40network/check
@@ -2,7 +2,7 @@
. $dracutfunctions
-for program in ip hostname; do
+for program in ip; do
which $program >/dev/null 2>&1
if [ $? -ne 0 ]; then
dwarning "Could not find program \"$program\" required by network."
diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script
index e3da4ea..013c8f1 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -38,7 +38,7 @@ setup_interface() {
done
fi >> /tmp/resolv.conf
- [ -n "$hostname" ] && echo hostname $hostname > /tmp/net.$netif.hostname
+ [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
}
PATH=$PATH:/sbin:/usr/sbin
diff --git a/modules.d/40network/ifup b/modules.d/40network/ifup
index ce39dcd..25cab26 100755
--- a/modules.d/40network/ifup
+++ b/modules.d/40network/ifup
@@ -40,7 +40,7 @@ do_static() {
} > /tmp/net.$netif.up
[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
- [ -n "$hostname" ] && echo hostname $hostname > /tmp/net.$netif.hostname
+ [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
echo online > /sys/class/net/$netif/uevent
}
diff --git a/modules.d/40network/install b/modules.d/40network/install
index ded70da..a711cb5 100755
--- a/modules.d/40network/install
+++ b/modules.d/40network/install
@@ -1,5 +1,5 @@
#!/bin/bash
-dracut_install ip dhclient hostname brctl
+dracut_install ip dhclient brctl
inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/netroot" "/sbin/netroot"
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/8] Add simple STP timeout handler
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
` (2 preceding siblings ...)
2009-09-17 15:16 ` [PATCH 3/8] Get rid of hostname utility Philippe Seewer
@ 2009-09-17 15:16 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 5/8] Add DAD to dhclient-script Philippe Seewer
` (4 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
This patch adds STP timeout error handling with arping. It's rather
simple since it only cares about the primary interface and blindly
assumes that if no gateway is available the root server is on the
same subnet.
---
modules.d/40network/check | 2 +-
modules.d/40network/install | 2 +-
modules.d/40network/netroot | 23 +++++++++++++++++++++++
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/modules.d/40network/check b/modules.d/40network/check
index cf06c74..e5cd87e 100755
--- a/modules.d/40network/check
+++ b/modules.d/40network/check
@@ -2,7 +2,7 @@
. $dracutfunctions
-for program in ip; do
+for program in ip arping; do
which $program >/dev/null 2>&1
if [ $? -ne 0 ]; then
dwarning "Could not find program \"$program\" required by network."
diff --git a/modules.d/40network/install b/modules.d/40network/install
index a711cb5..c440cc3 100755
--- a/modules.d/40network/install
+++ b/modules.d/40network/install
@@ -1,5 +1,5 @@
#!/bin/bash
-dracut_install ip dhclient brctl
+dracut_install ip dhclient brctl arping
inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/netroot" "/sbin/netroot"
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
index 3b343af..3deb031 100755
--- a/modules.d/40network/netroot
+++ b/modules.d/40network/netroot
@@ -92,6 +92,29 @@ done
[ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname
[ -e /tmp/resolv.conf ] && cp -f /tmp/resolv.conf /etc/resolv.conf
+# Load interface options
+[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
+[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
+
+# Handle STP Timeout: arping default router or if not available the
+# root server. Note: This assumes that if no router is present the
+# root server is on the same subnet.
+#
+# TODO There's some netroot variants that don't (yet) have their
+# server-ip netroot
+[ -n "$new_routers" ] && dest=${new_routers%%,*}
+[ -n "$gw" ] && dest=$gw
+if [ -z "$dest" ] ; then
+ dummy=${netroot#*:}
+ dummy=${dummy%%:*}
+ case "$dummy" in
+ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) dest=$dummy;;
+ esac
+fi
+if [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then
+ die "Resolving $dest via ARP on $netif failed"
+fi
+
# Source netroot hooks before we start the handler
source_all netroot
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/8] Add DAD to dhclient-script
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
` (3 preceding siblings ...)
2009-09-17 15:16 ` [PATCH 4/8] Add simple STP timeout handler Philippe Seewer
@ 2009-09-17 15:16 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 6/8] Add multinic test suite Philippe Seewer
` (3 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
The manpage for dhclient-script says:
Before actually configuring the address, dhclient-script should
somehow ARP for it and exit with a nonzero status if it receives a
reply.
By using arping in dracut this is very easy, since arping has a
specific option to do just that.
---
modules.d/40network/dhclient-script | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script
index 013c8f1..b03cf1c 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -64,6 +64,10 @@ case $reason in
sleep 1
;;
BOUND)
+ if ! arping -q -D -c 2 -I $netif $new_ip_address ; then
+ warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
+ exit 1
+ fi
setup_interface
set | while read line; do
[ "${line#new_}" = "$line" ] && continue
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/8] Add multinic test suite
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
` (4 preceding siblings ...)
2009-09-17 15:16 ` [PATCH 5/8] Add DAD to dhclient-script Philippe Seewer
@ 2009-09-17 15:16 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 7/8] Move write-ifcfg to its own module Philippe Seewer
` (2 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
This is a start a test suite for the multinic support of dracut
---
modules.d/99base/init | 1 +
test/TEST-50-MULTINIC/Makefile | 10 ++
test/TEST-50-MULTINIC/client-init | 9 ++
test/TEST-50-MULTINIC/dhcpd.conf | 36 ++++++
test/TEST-50-MULTINIC/exports | 1 +
test/TEST-50-MULTINIC/hard-off.sh | 2 +
test/TEST-50-MULTINIC/hosts | 5 +
test/TEST-50-MULTINIC/server-init | 30 +++++
test/TEST-50-MULTINIC/test.sh | 226 +++++++++++++++++++++++++++++++++++++
9 files changed, 320 insertions(+), 0 deletions(-)
create mode 100644 test/TEST-50-MULTINIC/Makefile
create mode 100755 test/TEST-50-MULTINIC/client-init
create mode 100644 test/TEST-50-MULTINIC/dhcpd.conf
create mode 100644 test/TEST-50-MULTINIC/exports
create mode 100755 test/TEST-50-MULTINIC/hard-off.sh
create mode 100644 test/TEST-50-MULTINIC/hosts
create mode 100755 test/TEST-50-MULTINIC/server-init
create mode 100755 test/TEST-50-MULTINIC/test.sh
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 455e809..116d8b8 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -236,6 +236,7 @@ fi
# Debug: Copy state
if getarg rdcopystate; then
+ mkdir /dev/.initramfs/
cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1
fi
diff --git a/test/TEST-50-MULTINIC/Makefile b/test/TEST-50-MULTINIC/Makefile
new file mode 100644
index 0000000..bc0ddb6
--- /dev/null
+++ b/test/TEST-50-MULTINIC/Makefile
@@ -0,0 +1,10 @@
+all:
+ @make -s --no-print-directory -C ../.. all
+ @basedir=../.. testdir=../ ./test.sh --all
+setup:
+ @make --no-print-directory -C ../.. all
+ @basedir=../.. testdir=../ ./test.sh --setup
+clean:
+ @basedir=../.. testdir=../ ./test.sh --clean
+run:
+ @basedir=../.. testdir=../ ./test.sh --run
diff --git a/test/TEST-50-MULTINIC/client-init b/test/TEST-50-MULTINIC/client-init
new file mode 100755
index 0000000..6b19167
--- /dev/null
+++ b/test/TEST-50-MULTINIC/client-init
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec >/dev/console 2>&1
+export TERM=linux
+export PS1='initramfs-test:\w\$ '
+stty sane
+echo "made it to the rootfs! Powering down."
+echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda
+#sh -i
+poweroff -f
diff --git a/test/TEST-50-MULTINIC/dhcpd.conf b/test/TEST-50-MULTINIC/dhcpd.conf
new file mode 100644
index 0000000..be8dee7
--- /dev/null
+++ b/test/TEST-50-MULTINIC/dhcpd.conf
@@ -0,0 +1,36 @@
+ddns-update-style none;
+
+use-host-decl-names true;
+
+subnet 192.168.50.0 netmask 255.255.255.0 {
+ option subnet-mask 255.255.255.0;
+ option routers 192.168.50.1;
+ next-server 192.168.50.1;
+ server-identifier 192.168.50.1;
+ option domain-name-servers 192.168.50.1;
+ option domain-search "example.com";
+ option domain-name "other.com";
+
+ group {
+ host client-if1 {
+ hardware ethernet 52:54:00:12:34:00;
+ fixed-address 192.168.50.100;
+ }
+ }
+
+ group {
+ host client-if2 {
+ hardware ethernet 52:54:00:12:34:01;
+ fixed-address 192.168.50.101;
+ }
+ }
+
+ group {
+ option root-path "nfs:192.168.50.1:/nfs/client";
+
+ host client-if3 {
+ hardware ethernet 52:54:00:12:34:02;
+ fixed-address 192.168.50.102;
+ }
+ }
+}
diff --git a/test/TEST-50-MULTINIC/exports b/test/TEST-50-MULTINIC/exports
new file mode 100644
index 0000000..82b62f0
--- /dev/null
+++ b/test/TEST-50-MULTINIC/exports
@@ -0,0 +1 @@
+/nfs/client 192.168.50.0/24(ro,insecure,no_subtree_check,no_root_squash)
diff --git a/test/TEST-50-MULTINIC/hard-off.sh b/test/TEST-50-MULTINIC/hard-off.sh
new file mode 100755
index 0000000..85fd849
--- /dev/null
+++ b/test/TEST-50-MULTINIC/hard-off.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+getarg rdinitdebug || poweroff -f
diff --git a/test/TEST-50-MULTINIC/hosts b/test/TEST-50-MULTINIC/hosts
new file mode 100644
index 0000000..d02a4e9
--- /dev/null
+++ b/test/TEST-50-MULTINIC/hosts
@@ -0,0 +1,5 @@
+127.0.0.1 localhost
+192.168.50.1 server
+192.168.50.100 client-if1
+192.168.50.101 client-if2
+192.168.50.102 client-if3
diff --git a/test/TEST-50-MULTINIC/server-init b/test/TEST-50-MULTINIC/server-init
new file mode 100755
index 0000000..78eab41
--- /dev/null
+++ b/test/TEST-50-MULTINIC/server-init
@@ -0,0 +1,30 @@
+#!/bin/sh
+export TERM=linux
+export PS1='nfstest-server:\w\$ '
+stty sane
+echo "made it to the rootfs!"
+echo server > /proc/sys/kernel/hostname
+ip addr add 127.0.0.1/8 dev lo
+ip link set lo up
+ip addr add 192.168.50.1/24 dev eth0
+ip link set eth0 up
+modprobe sunrpc
+mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs
+[ -x /sbin/portmap ] && portmap
+[ -x /sbin/rpcbind ] && rpcbind
+modprobe nfsd
+mount -t nfsd nfsd /proc/fs/nfsd
+exportfs -r
+rpc.nfsd
+rpc.mountd
+rpc.idmapd
+exportfs -r
+>/var/lib/dhcpd/dhcpd.leases
+chmod 777 /var/lib/dhcpd/dhcpd.leases
+dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
+#sh -i
+# Wait forever for the VM to die
+echo "Serving NFS mounts"
+while sleep 60; do sleep 60; done
+mount -n -o remount,ro /
+poweroff -f
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
new file mode 100755
index 0000000..0d9460b
--- /dev/null
+++ b/test/TEST-50-MULTINIC/test.sh
@@ -0,0 +1,226 @@
+#!/bin/bash
+TEST_DESCRIPTION="root filesystem on NFS with multiple nics"
+
+KVERSION=${KVERSION-$(uname -r)}
+
+# Uncomment this to debug failures
+#DEBUGFAIL="rdinitdebug rdnetdebug"
+
+run_server() {
+ # Start server first
+ echo "MULTINIC TEST SETUP: Starting DHCP/NFS server"
+
+ $testdir/run-qemu -hda server.ext2 -m 256M -nographic \
+ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
+ -net socket,mcast=230.0.0.1:1234 \
+ -serial udp:127.0.0.1:9999 \
+ -kernel /boot/vmlinuz-$KVERSION \
+ -append "root=/dev/sda rw quiet console=ttyS0,115200n81" \
+ -initrd initramfs.server -pidfile server.pid -daemonize || return 1
+ sudo chmod 644 server.pid || return 1
+
+ # Cleanup the terminal if we have one
+ tty -s && stty sane
+
+ echo Sleeping 10 seconds to give the server a head start
+ sleep 10
+}
+
+client_test() {
+ local test_name="$1"
+ local mac1="$2"
+ local mac2="$3"
+ local mac3="$4"
+ local cmdline="$5"
+ local check="$6"
+
+ echo "CLIENT TEST START: $test_name"
+
+ # Need this so kvm-qemu will boot (needs non-/dev/zero local disk)
+ if ! dd if=/dev/zero of=client.img bs=1M count=1; then
+ echo "Unable to make client sda image" 1>&2
+ return 1
+ fi
+
+ $testdir/run-qemu -hda client.img -m 512M -nographic \
+ -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \
+ -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \
+ -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \
+ -net socket,mcast=230.0.0.1:1234 \
+ -kernel /boot/vmlinuz-$KVERSION \
+ -append "$cmdline $DEBUGFAIL ro quiet console=ttyS0,115200n81 rdcopystate" \
+ -initrd initramfs.testing
+
+ if [[ $? -ne 0 ]] || ! grep -m 1 -q OK client.img; then
+ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
+ return 1
+ fi
+
+
+ for i in $check ; do
+ echo $i
+ if ! grep -m 1 -q $i client.img; then
+ echo "CLIENT TEST END: $test_name [FAILED - BAD IF]"
+ return 1
+ fi
+ done
+
+ echo "CLIENT TEST END: $test_name [OK]"
+ return 0
+}
+
+
+test_run() {
+ if ! run_server; then
+ echo "Failed to start server" 1>&2
+ return 1
+ fi
+
+ # Mac Numbering Scheme
+ # ...:00-02 receive IP adresses all others don't
+ # ...:02 receives a dhcp root-path
+
+ # PXE Style BOOTIF=
+ client_test "MULTINIC root=nfs BOOTIF=" \
+ 00 01 02 \
+ "root=nfs:192.168.50.1:/nfs/client BOOTIF=52-54-00-12-34-00" \
+ "eth0" || return 1
+
+ # PXE Style BOOTIF= with dhcp root-path
+ client_test "MULTINIC root=dhcp BOOTIF=" \
+ 00 01 02 \
+ "root=dhcp BOOTIF=52-54-00-12-34-02" \
+ "eth2" || return 1
+
+ # Multinic case, where only one nic works
+ client_test "MULTINIC root=nfs ip=dhcp" \
+ FF 00 FE \
+ "root=nfs:192.168.50.1:/nfs/client ip=dhcp" \
+ "eth1" || return 1
+
+ # Require two interfaces
+ client_test "MULTINIC root=nfs ip=eth1:dhcp ip=eth2:dhcp bootdev=eth1" \
+ 00 01 02 \
+ "root=nfs:192.168.50.1:/nfs/client ip=eth1:dhcp ip=eth2:dhcp bootdev=eth1" \
+ "eth1 eth2" || return 1
+
+ # Require three interfaces with dhcp root-path
+ client_test "MULTINIC root=dhcp ip=eth0:dhcp ip=eth1:dhcp ip=eth2:dhcp bootdev=eth2" \
+ 00 01 02 \
+ "root=dhcp ip=eth0:dhcp ip=eth1:dhcp ip=eth2:dhcp bootdev=eth2" \
+ "eth0 eth1 eth2" || return 1
+}
+
+test_setup() {
+ # Make server root
+ dd if=/dev/zero of=server.ext2 bs=1M count=60
+ mke2fs -F server.ext2
+ mkdir mnt
+ sudo mount -o loop server.ext2 mnt
+
+ kernel=$KVERSION
+ (
+ initdir=mnt
+ . $basedir/dracut-functions
+ dracut_install sh ls shutdown poweroff stty cat ps ln ip \
+ /lib/terminfo/l/linux dmesg mkdir cp ping exportfs \
+ modprobe rpc.nfsd rpc.mountd showmount tcpdump \
+ /etc/services sleep mount chmod
+ which portmap >/dev/null 2>&1 && dracut_install portmap
+ which rpcbind >/dev/null 2>&1 && dracut_install rpcbind
+ [ -f /etc/netconfig ] && dracut_install /etc/netconfig
+ which dhcpd >/dev/null 2>&1 && dracut_install dhcpd
+ [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
+ instmods nfsd sunrpc ipv6
+ inst ./server-init /sbin/init
+ inst ./hosts /etc/hosts
+ inst ./exports /etc/exports
+ inst ./dhcpd.conf /etc/dhcpd.conf
+ dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols
+ dracut_install rpc.idmapd /etc/idmapd.conf
+ if ldd $(which rpc.idmapd) |grep -q lib64; then
+ LIBDIR="/lib64"
+ else
+ LIBDIR="/lib"
+ fi
+
+ dracut_install $(ls {/usr,}$LIBDIR/libnfsidmap*.so* 2>/dev/null )
+ dracut_install $(ls {/usr,}$LIBDIR/libnss*.so 2>/dev/null)
+ (
+ cd "$initdir";
+ mkdir -p dev sys proc etc var/run tmp var/lib/{dhcpd,rpcbind}
+ mkdir -p var/lib/nfs/{v4recovery,rpc_pipefs}
+ chmod 777 var/lib/rpcbind var/lib/nfs
+ )
+ inst /etc/nsswitch.conf /etc/nsswitch.conf
+ inst /etc/passwd /etc/passwd
+ inst /etc/group /etc/group
+ for i in /lib*/libnss_files**;do
+ inst_library $i
+ done
+
+ /sbin/depmod -a -b "$initdir" $kernel
+ ldconfig -n -r "$initdir" /lib* /usr/lib*
+ )
+
+ # Make client root inside server root
+ initdir=mnt/nfs/client
+ mkdir -p $initdir
+
+ (
+ . $basedir/dracut-functions
+ dracut_install sh shutdown poweroff stty cat ps ln ip \
+ /lib/terminfo/l/linux mount dmesg mkdir \
+ cp ping grep
+ inst ./client-init /sbin/init
+ (
+ cd "$initdir"
+ mkdir -p dev sys proc etc
+ mkdir -p var/lib/nfs/rpc_pipefs
+ )
+ inst /etc/nsswitch.conf /etc/nsswitch.conf
+ inst /etc/passwd /etc/passwd
+ inst /etc/group /etc/group
+ for i in /lib*/libnss_files*;do
+ inst_library $i
+ done
+
+ ldconfig -n -r "$initdir" /lib* /usr/lib*
+ )
+
+ sudo umount mnt
+ rm -fr mnt
+
+ # Make an overlay with needed tools for the test harness
+ (
+ initdir=overlay
+ mkdir overlay
+ . $basedir/dracut-functions
+ dracut_install poweroff shutdown
+ inst_simple ./hard-off.sh /emergency/01hard-off.sh
+ )
+
+ # Make server's dracut image
+ $basedir/dracut -l -i overlay / \
+ -m "dash udev-rules base rootfs-block debug kernel-modules" \
+ -d "ata_piix ext2 sd_mod e1000" \
+ -f initramfs.server $KVERSION || return 1
+
+ # Make client's dracut image
+ $basedir/dracut -l -i overlay / \
+ -o "plymouth" \
+ -a "debug" \
+ -d "e1000 nfs sunrpc" \
+ -f initramfs.testing $KVERSION || return 1
+}
+
+test_cleanup() {
+ if [[ -s server.pid ]]; then
+ sudo kill -TERM $(cat server.pid)
+ rm -f server.pid
+ fi
+ rm -rf mnt overlay
+ rm -f server.ext2 client.img initramfs.server initramfs.testing
+}
+
+. $testdir/test-functions
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 7/8] Move write-ifcfg to its own module
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
` (5 preceding siblings ...)
2009-09-17 15:16 ` [PATCH 6/8] Add multinic test suite Philippe Seewer
@ 2009-09-17 15:16 ` Philippe Seewer
2009-09-17 15:16 ` [PATCH 8/8] Move netroot to initqueue Philippe Seewer
2009-10-07 14:50 ` [PATCH 0/8] Netroot updates and multinic test-suite Harald Hoyer
8 siblings, 0 replies; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
ifcfg config style is redhat specific, this should be in its own
module.
---
modules.d/40network/install | 4 --
modules.d/40network/write-ifcfg.sh | 52 -------------------------------
modules.d/45ifcfg/check | 6 +++
modules.d/45ifcfg/install | 2 +
modules.d/45ifcfg/write-ifcfg.sh | 60 ++++++++++++++++++++++++++++++++++++
modules.d/99base/init | 10 ------
6 files changed, 68 insertions(+), 66 deletions(-)
delete mode 100755 modules.d/40network/write-ifcfg.sh
create mode 100755 modules.d/45ifcfg/check
create mode 100755 modules.d/45ifcfg/install
create mode 100755 modules.d/45ifcfg/write-ifcfg.sh
diff --git a/modules.d/40network/install b/modules.d/40network/install
index c440cc3..197be22 100755
--- a/modules.d/40network/install
+++ b/modules.d/40network/install
@@ -12,8 +12,4 @@ inst_hook cmdline 98 "$moddir/parse-bridge.sh"
inst_hook cmdline 99 "$moddir/parse-ifname.sh"
inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh"
-# TODO ifcfg config style is redhat specific, this should probably
-# go into its own module at one time
-inst_hook pre-pivot 85 "$moddir/write-ifcfg.sh"
-
mkdir -p "${initdir}/var/run"
diff --git a/modules.d/40network/write-ifcfg.sh b/modules.d/40network/write-ifcfg.sh
deleted file mode 100755
index 3d9b3b1..0000000
--- a/modules.d/40network/write-ifcfg.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-
-# NFS root might have reached here before /tmp/net.ifaces was written
-udevadm settle --timeout=30
-# Don't write anything if we don't know our bootdev
-[ -f /tmp/net.ifaces ] || return 1
-
-read IFACES < /tmp/net.ifaces
-
-for netif in $IFACES ; do
- mkdir -p /tmp/ifcfg/
- # bridge?
- unset bridge
- if [ "$netif" = "$bridgename" ]; then
- bridge=yes
- fi
- cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
- echo "# Generated by dracut initrd" > /tmp/ifcfg/ifcfg-$netif
- echo "DEVICE=$netif" >> /tmp/ifcfg/ifcfg-$netif
- echo "ONBOOT=yes" >> /tmp/ifcfg/ifcfg-$netif
- echo "NETBOOT=yes" >> /tmp/ifcfg/ifcfg-$netif
- if [ -f /tmp/net.$netif.lease ]; then
- echo "BOOTPROTO=dhcp" >> /tmp/ifcfg/ifcfg-$netif
- else
- echo "BOOTPROTO=none" >> /tmp/ifcfg/ifcfg-$netif
- # If we've booted with static ip= lines, the override file is there
- . /tmp/net.$netif.override
- echo "IPADDR=$ip" >> /tmp/ifcfg/ifcfg-$netif
- echo "NETMASK=$mask" >> /tmp/ifcfg/ifcfg-$netif
- [ -n "$gw" ] && echo "GATEWAY=$gw" >> /tmp/ifcfg/ifcfg-$netif
- fi
-
- # bridge needs differente things written to ifcfg
- if [ -z "$bridge" ]; then
- # standard interface
- echo "HWADDR=$(cat /sys/class/net/$netif/address)" >> /tmp/ifcfg/ifcfg-$netif
- echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$netif
- echo "NAME=\"Boot Disk\"" >> /tmp/ifcfg/ifcfg-$netif
- else
- # bridge
- echo "TYPE=Bridge" >> /tmp/ifcfg/ifcfg-$netif
- echo "NAME=\"Boot Disk\"" >> /tmp/ifcfg/ifcfg-$netif
- # write separate ifcfg file for the raw eth interface
- echo "DEVICE=$ethname" >> /tmp/ifcfg/ifcfg-$ethname
- echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$ethname
- echo "ONBOOT=yes" >> /tmp/ifcfg/ifcfg-$ethname
- echo "NETBOOT=yes" >> /tmp/ifcfg/ifcfg-$ethname
- echo "HWADDR=$(cat /sys/class/net/$ethname/address)" >> /tmp/ifcfg/ifcfg-$ethname
- echo "BRIDGE=$netif" >> /tmp/ifcfg/ifcfg-$ethname
- echo "NAME=$ethname" >> /tmp/ifcfg/ifcfg-$ethname
- fi
-done
diff --git a/modules.d/45ifcfg/check b/modules.d/45ifcfg/check
new file mode 100755
index 0000000..0f6e457
--- /dev/null
+++ b/modules.d/45ifcfg/check
@@ -0,0 +1,6 @@
+#!/bin/sh
+[ -f /etc/redhat-release ] || exit 1
+
+[[ $1 = -d ]] && echo network
+
+exit 255
diff --git a/modules.d/45ifcfg/install b/modules.d/45ifcfg/install
new file mode 100755
index 0000000..2d0edd0
--- /dev/null
+++ b/modules.d/45ifcfg/install
@@ -0,0 +1,2 @@
+#!/bin/bash
+inst_hook pre-pivot 85 "$moddir/write-ifcfg.sh"
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
new file mode 100755
index 0000000..fc8965c
--- /dev/null
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# NFS root might have reached here before /tmp/net.ifaces was written
+udevadm settle --timeout=30
+# Don't write anything if we don't know our bootdev
+[ -f /tmp/net.ifaces ] || return 1
+
+read IFACES < /tmp/net.ifaces
+
+for netif in $IFACES ; do
+ mkdir -p /tmp/ifcfg/
+ # bridge?
+ unset bridge
+ if [ "$netif" = "$bridgename" ]; then
+ bridge=yes
+ fi
+ cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
+ echo "# Generated by dracut initrd" > /tmp/ifcfg/ifcfg-$netif
+ echo "DEVICE=$netif" >> /tmp/ifcfg/ifcfg-$netif
+ echo "ONBOOT=yes" >> /tmp/ifcfg/ifcfg-$netif
+ echo "NETBOOT=yes" >> /tmp/ifcfg/ifcfg-$netif
+ if [ -f /tmp/net.$netif.lease ]; then
+ echo "BOOTPROTO=dhcp" >> /tmp/ifcfg/ifcfg-$netif
+ else
+ echo "BOOTPROTO=none" >> /tmp/ifcfg/ifcfg-$netif
+ # If we've booted with static ip= lines, the override file is there
+ . /tmp/net.$netif.override
+ echo "IPADDR=$ip" >> /tmp/ifcfg/ifcfg-$netif
+ echo "NETMASK=$mask" >> /tmp/ifcfg/ifcfg-$netif
+ [ -n "$gw" ] && echo "GATEWAY=$gw" >> /tmp/ifcfg/ifcfg-$netif
+ fi
+
+ # bridge needs differente things written to ifcfg
+ if [ -z "$bridge" ]; then
+ # standard interface
+ echo "HWADDR=$(cat /sys/class/net/$netif/address)" >> /tmp/ifcfg/ifcfg-$netif
+ echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$netif
+ echo "NAME=\"Boot Disk\"" >> /tmp/ifcfg/ifcfg-$netif
+ else
+ # bridge
+ echo "TYPE=Bridge" >> /tmp/ifcfg/ifcfg-$netif
+ echo "NAME=\"Boot Disk\"" >> /tmp/ifcfg/ifcfg-$netif
+ # write separate ifcfg file for the raw eth interface
+ echo "DEVICE=$ethname" >> /tmp/ifcfg/ifcfg-$ethname
+ echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$ethname
+ echo "ONBOOT=yes" >> /tmp/ifcfg/ifcfg-$ethname
+ echo "NETBOOT=yes" >> /tmp/ifcfg/ifcfg-$ethname
+ echo "HWADDR=$(cat /sys/class/net/$ethname/address)" >> /tmp/ifcfg/ifcfg-$ethname
+ echo "BRIDGE=$netif" >> /tmp/ifcfg/ifcfg-$ethname
+ echo "NAME=$ethname" >> /tmp/ifcfg/ifcfg-$ethname
+ fi
+done
+
+# Pass network opts
+mkdir /dev/.initramfs/
+cp /tmp/net.* /dev/.initramfs/ >/dev/null 2>&1
+mkdir -p /dev/.initramfs/state/etc/sysconfig/network-scripts/
+cp /tmp/resolv.conf /dev/.initramfs/state/etc/ >/dev/null 2>&1
+echo "files /etc/sysconfig/network-scripts" > /dev/.initramfs/rwtab
+cp -a /tmp/ifcfg/* /dev/.initramfs/state/etc/sysconfig/network-scripts/ >/dev/null 2>&1
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 116d8b8..d34092b 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -224,16 +224,6 @@ if getarg init= >/dev/null ; then
unset CLINE
fi
-# Prepare network opts for passing
-if [ -e /tmp/net.ifaces ]; then
- mkdir /dev/.initramfs/
- cp /tmp/net.* /dev/.initramfs/ >/dev/null 2>&1
- mkdir -p /dev/.initramfs/state/etc/sysconfig/network-scripts/
- cp /tmp/resolv.conf /dev/.initramfs/state/etc/ >/dev/null 2>&1
- echo "files /etc/sysconfig/network-scripts" > /dev/.initramfs/rwtab
- cp -a /tmp/ifcfg/* /dev/.initramfs/state/etc/sysconfig/network-scripts/ >/dev/null 2>&1
-fi
-
# Debug: Copy state
if getarg rdcopystate; then
mkdir /dev/.initramfs/
--
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 8/8] Move netroot to initqueue
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
` (6 preceding siblings ...)
2009-09-17 15:16 ` [PATCH 7/8] Move write-ifcfg to its own module Philippe Seewer
@ 2009-09-17 15:16 ` Philippe Seewer
[not found] ` <1253200609-31629-9-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
2009-10-07 14:50 ` [PATCH 0/8] Netroot updates and multinic test-suite Harald Hoyer
8 siblings, 1 reply; 13+ messages in thread
From: Philippe Seewer @ 2009-09-17 15:16 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Philippe Seewer
Due to possible timeouts inside netroot exceeding the usual udev
timeout limit, netroot should be called from inside the unsettled
initqueue.
ifup/dhclient should still remain inside udev because they should
be able to run in parallel and the dhcp-timeouts are udev
"compatible".
---
modules.d/40network/net-genrules.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index ba369cc..1332db2 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -39,5 +39,5 @@ fix_bootif() {
# 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'
+ printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/initqueue --onetime /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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 8/8] Move netroot to initqueue
[not found] ` <1253200609-31629-9-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
@ 2009-09-17 15:30 ` Seewer Philippe
0 siblings, 0 replies; 13+ messages in thread
From: Seewer Philippe @ 2009-09-17 15:30 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA@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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] Netroot updates and multinic test-suite
[not found] ` <1253200609-31629-1-git-send-email-philippe.seewer-omB+W0Dpw2o@public.gmane.org>
` (7 preceding siblings ...)
2009-09-17 15:16 ` [PATCH 8/8] Move netroot to initqueue Philippe Seewer
@ 2009-10-07 14:50 ` Harald Hoyer
[not found] ` <4ACCAAAA.7070003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
8 siblings, 1 reply; 13+ messages in thread
From: Harald Hoyer @ 2009-10-07 14:50 UTC (permalink / raw)
To: Philippe Seewer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
pushed most of these
On 09/17/2009 05:16 PM, Philippe Seewer wrote:
> A bit late, but this is the corrected updates to netroot I sent
> a while ago, plus some new things that are needed.
>
> Philippe Seewer (8):
> Give the kernel some time to up interfaces
> Be a bit more optimistic when setting mtus
> Get rid of hostname utility
> Add simple STP timeout handler
> Add DAD to dhclient-script
> Add multinic test suite
> Move write-ifcfg to its own module
> Move netroot to initqueue
>
> modules.d/40network/check | 2 +-
> modules.d/40network/dhclient-script | 24 +++-
> modules.d/40network/ifup | 5 +-
> modules.d/40network/install | 6 +-
> modules.d/40network/net-genrules.sh | 2 +-
> modules.d/40network/netroot | 23 ++++
> modules.d/40network/write-ifcfg.sh | 52 --------
> modules.d/45ifcfg/check | 6 +
> modules.d/45ifcfg/install | 2 +
> modules.d/45ifcfg/write-ifcfg.sh | 60 +++++++++
> modules.d/99base/init | 11 +--
> test/TEST-50-MULTINIC/Makefile | 10 ++
> test/TEST-50-MULTINIC/client-init | 9 ++
> test/TEST-50-MULTINIC/dhcpd.conf | 36 ++++++
> test/TEST-50-MULTINIC/exports | 1 +
> test/TEST-50-MULTINIC/hard-off.sh | 2 +
> test/TEST-50-MULTINIC/hosts | 5 +
> test/TEST-50-MULTINIC/server-init | 30 +++++
> test/TEST-50-MULTINIC/test.sh | 226 +++++++++++++++++++++++++++++++++++
> 19 files changed, 436 insertions(+), 76 deletions(-)
> delete mode 100755 modules.d/40network/write-ifcfg.sh
> create mode 100755 modules.d/45ifcfg/check
> create mode 100755 modules.d/45ifcfg/install
> create mode 100755 modules.d/45ifcfg/write-ifcfg.sh
> create mode 100644 test/TEST-50-MULTINIC/Makefile
> create mode 100755 test/TEST-50-MULTINIC/client-init
> create mode 100644 test/TEST-50-MULTINIC/dhcpd.conf
> create mode 100644 test/TEST-50-MULTINIC/exports
> create mode 100755 test/TEST-50-MULTINIC/hard-off.sh
> create mode 100644 test/TEST-50-MULTINIC/hosts
> create mode 100755 test/TEST-50-MULTINIC/server-init
> create mode 100755 test/TEST-50-MULTINIC/test.sh
>
> --
> 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
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] Netroot updates and multinic test-suite
[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>
0 siblings, 1 reply; 13+ messages in thread
From: Warren Togami @ 2009-10-07 16:53 UTC (permalink / raw)
To: Harald Hoyer; +Cc: Philippe Seewer, initramfs-u79uwXL29TY76Z2rM5mHXA
Where? I don't see these changes at origin/master.
On 10/07/2009 10:50 AM, Harald Hoyer wrote:
> pushed most of these
>
> On 09/17/2009 05:16 PM, Philippe Seewer wrote:
>> A bit late, but this is the corrected updates to netroot I sent
>> a while ago, plus some new things that are needed.
>>
>> Philippe Seewer (8):
>> Give the kernel some time to up interfaces
>> Be a bit more optimistic when setting mtus
>> Get rid of hostname utility
>> Add simple STP timeout handler
>> Add DAD to dhclient-script
>> Add multinic test suite
>> Move write-ifcfg to its own module
>> Move netroot to initqueue
>>
>> modules.d/40network/check | 2 +-
>> modules.d/40network/dhclient-script | 24 +++-
>> modules.d/40network/ifup | 5 +-
>> modules.d/40network/install | 6 +-
>> modules.d/40network/net-genrules.sh | 2 +-
>> modules.d/40network/netroot | 23 ++++
>> modules.d/40network/write-ifcfg.sh | 52 --------
>> modules.d/45ifcfg/check | 6 +
>> modules.d/45ifcfg/install | 2 +
>> modules.d/45ifcfg/write-ifcfg.sh | 60 +++++++++
>> modules.d/99base/init | 11 +--
>> test/TEST-50-MULTINIC/Makefile | 10 ++
>> test/TEST-50-MULTINIC/client-init | 9 ++
>> test/TEST-50-MULTINIC/dhcpd.conf | 36 ++++++
>> test/TEST-50-MULTINIC/exports | 1 +
>> test/TEST-50-MULTINIC/hard-off.sh | 2 +
>> test/TEST-50-MULTINIC/hosts | 5 +
>> test/TEST-50-MULTINIC/server-init | 30 +++++
>> test/TEST-50-MULTINIC/test.sh | 226 +++++++++++++++++++++++++++++++++++
>> 19 files changed, 436 insertions(+), 76 deletions(-)
>> delete mode 100755 modules.d/40network/write-ifcfg.sh
>> create mode 100755 modules.d/45ifcfg/check
>> create mode 100755 modules.d/45ifcfg/install
>> create mode 100755 modules.d/45ifcfg/write-ifcfg.sh
>> create mode 100644 test/TEST-50-MULTINIC/Makefile
>> create mode 100755 test/TEST-50-MULTINIC/client-init
>> create mode 100644 test/TEST-50-MULTINIC/dhcpd.conf
>> create mode 100644 test/TEST-50-MULTINIC/exports
>> create mode 100755 test/TEST-50-MULTINIC/hard-off.sh
>> create mode 100644 test/TEST-50-MULTINIC/hosts
>> create mode 100755 test/TEST-50-MULTINIC/server-init
>> create mode 100755 test/TEST-50-MULTINIC/test.sh
>>
>> --
>> 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
>
> --
> 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
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] Netroot updates and multinic test-suite
[not found] ` <4ACCC79A.2000602-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-10-07 16:57 ` Harald Hoyer
0 siblings, 0 replies; 13+ messages in thread
From: Harald Hoyer @ 2009-10-07 16:57 UTC (permalink / raw)
To: Warren Togami; +Cc: Philippe Seewer, initramfs-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 2848 bytes --]
look closer!
http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=summary
Am 07.10.2009 18:53, schrieb Warren Togami:
> Where? I don't see these changes at origin/master.
>
> On 10/07/2009 10:50 AM, Harald Hoyer wrote:
>> pushed most of these
>>
>> On 09/17/2009 05:16 PM, Philippe Seewer wrote:
>>> A bit late, but this is the corrected updates to netroot I sent
>>> a while ago, plus some new things that are needed.
>>>
>>> Philippe Seewer (8):
>>> Give the kernel some time to up interfaces
>>> Be a bit more optimistic when setting mtus
>>> Get rid of hostname utility
>>> Add simple STP timeout handler
>>> Add DAD to dhclient-script
>>> Add multinic test suite
>>> Move write-ifcfg to its own module
>>> Move netroot to initqueue
>>>
>>> modules.d/40network/check | 2 +-
>>> modules.d/40network/dhclient-script | 24 +++-
>>> modules.d/40network/ifup | 5 +-
>>> modules.d/40network/install | 6 +-
>>> modules.d/40network/net-genrules.sh | 2 +-
>>> modules.d/40network/netroot | 23 ++++
>>> modules.d/40network/write-ifcfg.sh | 52 --------
>>> modules.d/45ifcfg/check | 6 +
>>> modules.d/45ifcfg/install | 2 +
>>> modules.d/45ifcfg/write-ifcfg.sh | 60 +++++++++
>>> modules.d/99base/init | 11 +--
>>> test/TEST-50-MULTINIC/Makefile | 10 ++
>>> test/TEST-50-MULTINIC/client-init | 9 ++
>>> test/TEST-50-MULTINIC/dhcpd.conf | 36 ++++++
>>> test/TEST-50-MULTINIC/exports | 1 +
>>> test/TEST-50-MULTINIC/hard-off.sh | 2 +
>>> test/TEST-50-MULTINIC/hosts | 5 +
>>> test/TEST-50-MULTINIC/server-init | 30 +++++
>>> test/TEST-50-MULTINIC/test.sh | 226 +++++++++++++++++++++++++++++++++++
>>> 19 files changed, 436 insertions(+), 76 deletions(-)
>>> delete mode 100755 modules.d/40network/write-ifcfg.sh
>>> create mode 100755 modules.d/45ifcfg/check
>>> create mode 100755 modules.d/45ifcfg/install
>>> create mode 100755 modules.d/45ifcfg/write-ifcfg.sh
>>> create mode 100644 test/TEST-50-MULTINIC/Makefile
>>> create mode 100755 test/TEST-50-MULTINIC/client-init
>>> create mode 100644 test/TEST-50-MULTINIC/dhcpd.conf
>>> create mode 100644 test/TEST-50-MULTINIC/exports
>>> create mode 100755 test/TEST-50-MULTINIC/hard-off.sh
>>> create mode 100644 test/TEST-50-MULTINIC/hosts
>>> create mode 100755 test/TEST-50-MULTINIC/server-init
>>> create mode 100755 test/TEST-50-MULTINIC/test.sh
>>>
>>> --
>>> 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
>>
>> --
>> 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
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3636 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-10-07 16:57 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.