diff --git a/netcfg.changes b/netcfg.changes index 2b2b033..bd7bac7 100644 --- a/netcfg.changes +++ b/netcfg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 25 10:46:20 UTC 2014 - pgajdos@suse.com + +- resolve some update scenarios [bnc#883999], [bnc#886443] (private) + with regard to /etc/HOSTNAME -> /etc/hostname change + ------------------------------------------------------------------- Wed Jun 11 08:47:56 UTC 2014 - pgajdos@suse.com diff --git a/netcfg.spec b/netcfg.spec index 11af4e2..c0d6999 100644 --- a/netcfg.spec +++ b/netcfg.spec @@ -88,11 +88,12 @@ fi #> to /etc/hostname. This should ensure /etc/HOSTNAME is properly created #> by RPM. if [ "0$1" -ge "2" ]; then - if [ -f /etc/HOSTNAME -a ! -h /etc/HOSTNAME ]; then + if [ -f /etc/HOSTNAME -a ! -L /etc/HOSTNAME ]; then if [ -f /etc/hostname ]; then mv /etc/hostname /etc/hostname.rpmsave fi - mv /etc/HOSTNAME /etc/hostname + ln -f /etc/HOSTNAME /etc/HOSTNAME.rpmsave + rm /etc/HOSTNAME fi fi @@ -102,6 +103,9 @@ if [ -f etc/...netgroup.new.rpmnew ]; then test ! -f etc/netgroup.rpmnew && cp etc/netgroup etc/netgroup.rpmnew mv etc/...netgroup.new.rpmnew etc/netgroup fi +if [ -f /etc/HOSTNAME.rpmsave -a ! -L /etc/HOSTNAME.rpmsave ]; then + cp -a /etc/HOSTNAME.rpmsave /etc/hostname +fi exit 0 %files