From 96b58768da2ed7d7cde4f10a3477625bae136eae9aea2199f34c4ba410503416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 1 Dec 2014 16:56:22 +0000 Subject: [PATCH] - Spec-cleanify the previous commit. OBS-URL: https://build.opensuse.org/package/show/Base:System/netcfg?expand=0&rev=34 --- netcfg.changes | 5 +++++ netcfg.spec | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/netcfg.changes b/netcfg.changes index 51640f2..11df41c 100644 --- a/netcfg.changes +++ b/netcfg.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 1 16:56:09 UTC 2014 - tchvatal@suse.com + +- Spec-cleanify the previous commit. + ------------------------------------------------------------------- Mon Dec 1 16:37:41 UTC 2014 - tchvatal@suse.com diff --git a/netcfg.spec b/netcfg.spec index 2bd739d..3828b88 100644 --- a/netcfg.spec +++ b/netcfg.spec @@ -44,8 +44,8 @@ Source101: services-compare.sh Source102: services-create.pl Source103: services_UPDATING Patch0: services-suse.diff -Requires(pre): coreutils -Requires(post): coreutils +Requires(post): coreutils +Requires(pre): coreutils BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -78,14 +78,14 @@ ln -s %{_sysconfdir}/hostname %{buildroot}%{_sysconfdir}/HOSTNAME # Nothing apart from content of the document is preserved # REMOVE after SLE11/openSUSE-13.1 out of MIGRATION support if [ "0$1" -ge "2" ]; then - if [ -f /etc/HOSTNAME -a ! -L /etc/HOSTNAME ]; then - cp /etc/HOSTNAME /etc/hostname.rpmsave - rm /etc/HOSTNAME + if [ -f %{_sysconfdir}/HOSTNAME -a ! -L %{_sysconfdir}/HOSTNAME ]; then + cp %{_sysconfdir}/HOSTNAME %{_sysconfdir}/hostname.rpmsave + rm %{_sysconfdir}/HOSTNAME fi # As some people are really on pills and did the link themselves other # way around ensure the package will install for them. - if [ -f /etc/hostname -a -f /etc/hostname.rpmsave ]; then - rm /etc/hostname + if [ -f %{_sysconfdir}/hostname -a -f %{_sysconfdir}/hostname.rpmsave ]; then + rm %{_sysconfdir}/hostname fi fi exit 0 @@ -98,15 +98,15 @@ if [ -f etc/defaultdomain.rpmnew ]; then fi # Put backuped HOSTNAME into the current hostname file -if [ -f /etc/hostname.rpmsave ]; then - mv /etc/hostname.rpmsave /etc/hostname +if [ -f %{_sysconfdir}/hostname.rpmsave ]; then + mv %{_sysconfdir}/hostname.rpmsave %{_sysconfdir}/hostname fi exit 0 %files %defattr(644,root,root,755) %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hostname -/etc/HOSTNAME +%{_sysconfdir}/HOSTNAME %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/aliases %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/defaultdomain %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ethers