X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F38-udev;fp=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F38-udev;h=0cad436d12c0fa394db89e414672694c1486d85a;hb=92611bf39dc9c4a7225d7d6e304c09be6dc78ece;hp=0000000000000000000000000000000000000000;hpb=4c34400fde5535c47b0938c8925927496aa167b0;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/38-udev b/etc/grml/fai/config/scripts/GRMLBASE/38-udev new file mode 100755 index 0000000..0cad436 --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/38-udev @@ -0,0 +1,28 @@ +#!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRMLBASE/38-udev +# Purpose: configure udev of live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +set -u +set -e + +[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf +[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local + +CONFFILE="$target/etc/udev/rules.d/70-persistent-net.rules" +STRING='This file was automatically generated by the /lib/udev/write_net_rules' + +# We do not want to get a predefined entry for eth0 of the *build* system, like: +# Unknown net device (/devices/virtio-pci/virtio0/net/eth0) (virtio_net) +# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="XX:XX:XX:XX:XX:XX", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" +# so therefore remove such an automatically generated file instead. +if grep -q "$STRING" "$CONFFILE" ; then + echo "Automatically generated /etc/udev/rules.d/70-persistent-net.rules found, removing it." + rm -f "$CONFFILE" +fi + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3