SW: add f2fs-tools to GRML_SMALL + GRML_FULL
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 38-udev
1 #!/bin/bash
2 # Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/38-udev
3 # Purpose:       configure udev of live-system
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -u
10 set -e
11
12 CONFFILE="$target/etc/udev/rules.d/70-persistent-net.rules"
13 STRING='This file was automatically generated by the /lib/udev/write_net_rules'
14
15 # We do not want to get a predefined entry for eth0 of the *build* system, like:
16 #   Unknown net device (/devices/virtio-pci/virtio0/net/eth0) (virtio_net)
17 #   SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="XX:XX:XX:XX:XX:XX", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
18 # so therefore remove such an automatically generated file instead.
19 if ! [ -r "$CONFFILE" ] ; then
20    echo "$CONFFILE does not exist, nothing to do."
21 else
22    if grep -q "$STRING" "$CONFFILE" ; then
23       echo "Automatically generated /etc/udev/rules.d/70-persistent-net.rules found, removing it."
24       rm -f "$CONFFILE"
25    fi
26 fi
27
28 ## END OF FILE #################################################################
29 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2