- resolve some update scenarios [bnc#883999], [bnc#886443] (private)

with regard to /etc/HOSTNAME -> /etc/hostname change

OBS-URL: https://build.opensuse.org/package/show/Base:System/netcfg?expand=0&rev=25
This commit is contained in:
Petr Gajdos 2014-07-25 10:50:00 +00:00 committed by Git OBS Bridge
parent bd2f068dcb
commit 6481673392
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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