From 96c260b3312abb1aa426a1ea227f24af528ecc54f632673794a67049d4532048 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 25 Sep 2015 14:20:16 +0000 Subject: [PATCH] Accepting request 333474 from home:jengelh:d2 - Avoid "file not found /etc/udev/rules.d/70-persistent-net.rules" OBS-URL: https://build.opensuse.org/request/show/333474 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=904 --- systemd-mini.changes | 6 ++++++ systemd-mini.spec | 8 +++++--- systemd.changes | 6 ++++++ systemd.spec | 8 +++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index c8113d2f..dc3e4eb9 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 23 14:19:32 UTC 2015 - jengelh@inai.de + +- Avoid "file not found /etc/udev/rules.d/70-persistent-net.rules" + waring occurring in %post + ------------------------------------------------------------------- Wed Sep 23 12:41:19 UTC 2015 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 2c650030..10026de9 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1021,9 +1021,11 @@ fi %post -n udev%{?mini} /usr/bin/udevadm hwdb --update || : -# add KERNEL name match to existing persistent net rules -sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ - /etc/udev/rules.d/70-persistent-net.rules || : +if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then + # add KERNEL name match to existing persistent net rules + sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ + /etc/udev/rules.d/70-persistent-net.rules || : +fi # cleanup old stuff rm -f /etc/sysconfig/udev rm -f /etc/udev/rules.d/20-cdrom.rules diff --git a/systemd.changes b/systemd.changes index c8113d2f..dc3e4eb9 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 23 14:19:32 UTC 2015 - jengelh@inai.de + +- Avoid "file not found /etc/udev/rules.d/70-persistent-net.rules" + waring occurring in %post + ------------------------------------------------------------------- Wed Sep 23 12:41:19 UTC 2015 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 94052ef4..609bab8f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1016,9 +1016,11 @@ fi %post -n udev%{?mini} /usr/bin/udevadm hwdb --update || : -# add KERNEL name match to existing persistent net rules -sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ - /etc/udev/rules.d/70-persistent-net.rules || : +if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then + # add KERNEL name match to existing persistent net rules + sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ + /etc/udev/rules.d/70-persistent-net.rules || : +fi # cleanup old stuff rm -f /etc/sysconfig/udev rm -f /etc/udev/rules.d/20-cdrom.rules