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
|
# REMOVE after SLE11/openSUSE-13.1 out of MIGRATION support
|
||||||
if [ $1 -gt 1 ]; then
|
if [ $1 -gt 1 ]; then
|
||||||
if [ -f %{_sysconfdir}/HOSTNAME -a ! -L %{_sysconfdir}/HOSTNAME ]; then
|
if [ -f %{_sysconfdir}/HOSTNAME -a ! -L %{_sysconfdir}/HOSTNAME ]; then
|
||||||
cat %{_sysconfdir}/HOSTNAME > %{_sysconfdir}/hostname.rpmsave
|
tempfile=`mktemp`
|
||||||
rm -rf %{_sysconfdir}/{HOSTNAME,hostname}
|
cat %{_sysconfdir}/HOSTNAME > $tempfile
|
||||||
cat %{_sysconfdir}/hostname.rpmsave > %{_sysconfdir}/hostname
|
rm -rf %{_sysconfdir}/HOSTNAME %{_sysconfdir}/hostname
|
||||||
rm -rf %{_sysconfdir}/hostname.rpmsave
|
cat $tempfile > %{_sysconfdir}/hostname
|
||||||
ln -s hostname %{_sysconfdir}/HOSTNAME
|
rm -rf $tempfile
|
||||||
|
ln -s %{_sysconfdir}/hostname %{_sysconfdir}/HOSTNAME
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user