From afefe9a9cc796baf03ffcd8b6bbe7aba2590cb19157858760f2b769cecd71ebb Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 5 Aug 2021 12:00:14 +0000 Subject: [PATCH] - bsc#1186249: Remove remaining references to /etc/init.d from dhclient-script and if-up.d.dhcpd-restart-hook . - Use , instead of - or / as a separator in sed when dealing with path names. OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=230 --- dhclient-script | 2 -- dhcp.changes | 8 ++++++++ dhcp.spec | 6 ++++-- if-up.d.dhcpd-restart-hook | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dhclient-script b/dhclient-script index c8792a8..1c98f16 100644 --- a/dhclient-script +++ b/dhclient-script @@ -340,8 +340,6 @@ set_hostname() # reload syslog so it knows the new hostname if test -x /usr/bin/systemctl ; then /usr/bin/systemctl reload syslog.service - else - /etc/init.d/syslog reload fi fi fi diff --git a/dhcp.changes b/dhcp.changes index cc2b04e..7d14e5b 100644 --- a/dhcp.changes +++ b/dhcp.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Aug 5 11:33:54 UTC 2021 - Reinhard Max + +- bsc#1186249: Remove remaining references to /etc/init.d from + dhclient-script and if-up.d.dhcpd-restart-hook . +- Use , instead of - or / as a separator in sed when dealing with + path names. + ------------------------------------------------------------------- Mon May 31 09:24:51 UTC 2021 - Reinhard Max diff --git a/dhcp.spec b/dhcp.spec index 5094427..856195f 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -312,7 +312,7 @@ install -m0754 $RPM_SOURCE_DIR/dhclient-script %{buildroot}%{sbindir}/ install -d -m0755 %{buildroot}%{_libexecdir}/dhcp install -m0755 $RPM_SOURCE_DIR/dhcpd.script \ %{buildroot}%{_libexecdir}/dhcp/dhcpd -sed -e 's/@LIBDIR@/%{_lib}/g' -i %{buildroot}%{_libexecdir}/dhcp/dhcpd +sed -e 's,@LIBDIR@,%{_lib},g' -i %{buildroot}%{_libexecdir}/dhcp/dhcpd install -m0755 $RPM_SOURCE_DIR/dhcrelay.script \ %{buildroot}%{_libexecdir}/dhcp/dhcrelay # service units @@ -325,7 +325,7 @@ install -m0644 $RPM_SOURCE_DIR/dhcrelay.service \ %{buildroot}%{_unitdir}/dhcrelay.service install -m0644 $RPM_SOURCE_DIR/dhcrelay6.service \ %{buildroot}%{_unitdir}/dhcrelay6.service -sed -e 's-@LIBEXECDIR@-%{_libexecdir}-g' -i %{buildroot}%{_unitdir}/d* +sed -e 's,@LIBEXECDIR@,%{_libexecdir},g' -i %{buildroot}%{_unitdir}/d* # rcservice links ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd6 @@ -365,6 +365,8 @@ install -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d install -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig/network/scripts install -m0755 $RPM_SOURCE_DIR/if-up.d.dhcpd-restart-hook \ %{buildroot}%{_sysconfdir}/sysconfig/network/scripts/dhcpd-restart-hook +sed 's,@LIBEXECDIR@,%{_libexecdir},g' -i \ + %{buildroot}%{_sysconfdir}/sysconfig/network/scripts/dhcpd-restart-hook ln -sf ../scripts/dhcpd-restart-hook \ %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook # slp support diff --git a/if-up.d.dhcpd-restart-hook b/if-up.d.dhcpd-restart-hook index 8e34d5c..8fd1783 100644 --- a/if-up.d.dhcpd-restart-hook +++ b/if-up.d.dhcpd-restart-hook @@ -102,7 +102,7 @@ dhcpv4_server_restart() fi if test "$restart_needed" = yes ; then - /etc/init.d/dhcpd try-restart + @LIBEXECDIR@/dhcp/dhcpd -4 try-restart fi } dhcpv6_server_restart() @@ -140,7 +140,7 @@ dhcpv6_server_restart() fi if test "$restart_needed" = yes ; then - /etc/init.d/dhcpd6 try-restart + @LIBEXECDIR@/dhcp/dhcpd -6 try-restart fi }