From a82c2ecff80a7560ce560e0b3e984c5148dd84eb3fe567896eddd16ab3cecabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 17 Dec 2014 11:09:44 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Base:System/netcfg?expand=0&rev=38 --- netcfg.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/netcfg.spec b/netcfg.spec index c94c4ba..7816f25 100644 --- a/netcfg.spec +++ b/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