diff options
author | Will Woods <wwoods@redhat.com> | 2012-03-07 11:58:24 -0500 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2012-03-16 12:36:58 -0400 |
commit | 972ebc553da365e804cd84a910895e1acdf303d9 (patch) | |
tree | 4a7ec6d24e5433ee4c991c7944d764b49b577ea8 /dracut/anaconda-netroot.sh | |
parent | 6e96a9bad1a51e9ff375fd17464a3aa5a7a21ed0 (diff) | |
download | anaconda-972ebc553da365e804cd84a910895e1acdf303d9.tar.gz anaconda-972ebc553da365e804cd84a910895e1acdf303d9.tar.xz anaconda-972ebc553da365e804cd84a910895e1acdf303d9.zip |
anaconda-netroot.sh: make sure dracut writes out the ifcfg files
We need to hand over the ifcfg file and dhclient lease to NetworkManager
to keep it from trashing our network interface when we're using NFS
root.
To get the files written by the ifcfg module, we need to make sure a few
things are set up properly.
Diffstat (limited to 'dracut/anaconda-netroot.sh')
-rwxr-xr-x | dracut/anaconda-netroot.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dracut/anaconda-netroot.sh b/dracut/anaconda-netroot.sh index 8ca66b5f0..81c7a0828 100755 --- a/dracut/anaconda-netroot.sh +++ b/dracut/anaconda-netroot.sh @@ -38,5 +38,18 @@ case $repo in ;; *) warn "unknown network repo URL: $repo" + return 1 ;; esac + +# TODO: probably shouldn't do this if mounting the net repo fails + +# need these to write out the ifcfg files / leases for NetworkManager +# TODO: this should be a save_netroot_data function in net-lib.sh +[ -e /tmp/net.ifaces ] || echo "$netif" > /tmp/net.ifaces +read IFACES < /tmp/net.ifaces +for iface in $IFACES ; do + for f in /tmp/dhclient.$iface.*; do + [ -f $f ] && cp $f /tmp/net.${f#/tmp/dhclient.} + done +done |