forked from pool/netcfg
This commit is contained in:
parent
92e3252b7d
commit
a82c2ecff8
11
netcfg.spec
11
netcfg.spec
@ -79,11 +79,12 @@ ln -s %{_sysconfdir}/hostname %{buildroot}%{_sysconfdir}/HOSTNAME
|
||||
# REMOVE after SLE11/openSUSE-13.1 out of MIGRATION support
|
||||
if [ $1 -gt 1 ]; then
|
||||
if [ -f %{_sysconfdir}/HOSTNAME -a ! -L %{_sysconfdir}/HOSTNAME ]; then
|
||||
cat %{_sysconfdir}/HOSTNAME > %{_sysconfdir}/hostname.rpmsave
|
||||
rm -rf %{_sysconfdir}/{HOSTNAME,hostname}
|
||||
cat %{_sysconfdir}/hostname.rpmsave > %{_sysconfdir}/hostname
|
||||
rm -rf %{_sysconfdir}/hostname.rpmsave
|
||||
ln -s hostname %{_sysconfdir}/HOSTNAME
|
||||
tempfile=`mktemp`
|
||||
cat %{_sysconfdir}/HOSTNAME > $tempfile
|
||||
rm -rf %{_sysconfdir}/HOSTNAME %{_sysconfdir}/hostname
|
||||
cat $tempfile > %{_sysconfdir}/hostname
|
||||
rm -rf $tempfile
|
||||
ln -s %{_sysconfdir}/hostname %{_sysconfdir}/HOSTNAME
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user