linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* write_net_rules all_interfaces
@ 2007-08-19 12:57 Bryan Kadzban
  2007-08-19 13:22 ` Marco d'Itri
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bryan Kadzban @ 2007-08-19 12:57 UTC (permalink / raw)
  To: linux-hotplug

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

So this was removed in udev-114, in favor of a manual loop like:

for i in /sys/class/net/* ; do
    echo "add" >$i/uevent
done

or something similar.  At least, that's what I gather from the commit
message; I'm not quite sure if it's right or not.

This is fine, mostly.  The problem comes in when installing another
system into (and inside) a chroot from a running host, as we do in LFS.
With the all_interfaces hack (which, admittedly, was ugly), the script
would happily run from inside the chroot, without requiring anything
from the host's udevd.  (If the host was even running udevd.  It wasn't
required.)  And since the script wasn't being called as part of a real
uevent, it would avoid renaming any actual (host-owned!) interfaces.

How should we handle pre-generating the rules from a system when
chrooted to it?  (We need to pre-generate the rules because the user has
to be able to add config files by interface name, so they need to know
what the names will be.)

I suppose it might work to (1) kill the host's udevd, (2) start one up
inside the chroot system, (3) send the uevents, then (4) kill it off,
(5) restart it on the host, and (6) re-send the host's uevents again.
The issue with this is the user may be off the network between steps 3
and 6, depending on firewall rules and whatnot; if the system is being
installed via ssh, this isn't going to work.

Any suggestions?  Thanks!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyD4dS5vET1Wea5wRA8PmAJ0QyhzyOGboUtw41sQNgQrBUFNgRgCfT/TJ
MnTAyjfuCdx2brU+qNUji7I=u4Ub
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-28 23:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-19 12:57 write_net_rules all_interfaces Bryan Kadzban
2007-08-19 13:22 ` Marco d'Itri
2007-08-20  0:02 ` Kay Sievers
2007-10-28 22:20 ` Marco d'Itri
2007-10-28 23:32 ` Bryan Kadzban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).