X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F38-udev;h=92bd25704f71b5974edf4a7fc2eb35c304b76c69;hb=17e7145abf34730eff02a38246213f018e4dd265;hp=0cad436d12c0fa394db89e414672694c1486d85a;hpb=92611bf39dc9c4a7225d7d6e304c09be6dc78ece;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/38-udev b/etc/grml/fai/config/scripts/GRMLBASE/38-udev index 0cad436..92bd257 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/38-udev +++ b/etc/grml/fai/config/scripts/GRMLBASE/38-udev @@ -1,5 +1,5 @@ -#!/bin/sh -# Filename: /etc/grml/fai/config/scripts/GRMLBASE/38-udev +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/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/ @@ -19,10 +19,14 @@ STRING='This file was automatically generated by the /lib/udev/write_net_rules' # 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" +if ! [ -r "$CONFFILE" ] ; then + echo "$CONFFILE does not exist, nothing to do." +else + if grep -q "$STRING" "$CONFFILE" ; then + echo "Automatically generated /etc/udev/rules.d/70-persistent-net.rules found, removing it." + rm -f "$CONFFILE" + fi fi ## END OF FILE ################################################################# -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2