From 6cfb9c1674153d918e2d6aae8092bb277f977ab352073f3b3828fc8566e29108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 1 Dec 2014 16:29:17 +0000 Subject: [PATCH] - Remove the socket check from the defaultdomain checker as it was always false and thus not needed - Add comment explaining the reason for the code OBS-URL: https://build.opensuse.org/package/show/Base:System/netcfg?expand=0&rev=32 --- netcfg.changes | 7 +++++++ netcfg.spec | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/netcfg.changes b/netcfg.changes index e8583b9..d545ce4 100644 --- a/netcfg.changes +++ b/netcfg.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 1 16:26:03 UTC 2014 - tchvatal@suse.com + +- Remove the socket check from the defaultdomain checker as it was + always false and thus not needed + - Add comment explaining the reason for the code + ------------------------------------------------------------------- Mon Dec 1 16:22:22 UTC 2014 - tchvatal@suse.com diff --git a/netcfg.spec b/netcfg.spec index 248ddf6..f50605c 100644 --- a/netcfg.spec +++ b/netcfg.spec @@ -90,7 +90,12 @@ if [ "0$1" -ge "2" ]; then fi %post -test -f etc/defaultdomain.rpmnew -a ! -s etc/defaultdomain.rpmnew && rm -f etc/defaultdomain.rpmnew +# If the defaultdomain changed just prune it, user is not interested in +# 0 size file anyway +if test -f etc/defaultdomain.rpmnew; then + rm -f etc/defaultdomain.rpmnew +fi + if [ -f /etc/HOSTNAME.rpmsave -a ! -L /etc/HOSTNAME.rpmsave ]; then cp -a /etc/HOSTNAME.rpmsave /etc/hostname fi