SHA256
1
0
forked from pool/dhcp

- 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
This commit is contained in:
Reinhard Max 2021-08-05 12:00:14 +00:00 committed by Git OBS Bridge
parent 5402a85a16
commit afefe9a9cc
4 changed files with 14 additions and 6 deletions

View File

@ -340,8 +340,6 @@ set_hostname()
# reload syslog so it knows the new hostname # reload syslog so it knows the new hostname
if test -x /usr/bin/systemctl ; then if test -x /usr/bin/systemctl ; then
/usr/bin/systemctl reload syslog.service /usr/bin/systemctl reload syslog.service
else
/etc/init.d/syslog reload
fi fi
fi fi
fi fi

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Aug 5 11:33:54 UTC 2021 - Reinhard Max <max@suse.com>
- 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 <max@suse.com> Mon May 31 09:24:51 UTC 2021 - Reinhard Max <max@suse.com>

View File

@ -312,7 +312,7 @@ install -m0754 $RPM_SOURCE_DIR/dhclient-script %{buildroot}%{sbindir}/
install -d -m0755 %{buildroot}%{_libexecdir}/dhcp install -d -m0755 %{buildroot}%{_libexecdir}/dhcp
install -m0755 $RPM_SOURCE_DIR/dhcpd.script \ install -m0755 $RPM_SOURCE_DIR/dhcpd.script \
%{buildroot}%{_libexecdir}/dhcp/dhcpd %{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 \ install -m0755 $RPM_SOURCE_DIR/dhcrelay.script \
%{buildroot}%{_libexecdir}/dhcp/dhcrelay %{buildroot}%{_libexecdir}/dhcp/dhcrelay
# service units # service units
@ -325,7 +325,7 @@ install -m0644 $RPM_SOURCE_DIR/dhcrelay.service \
%{buildroot}%{_unitdir}/dhcrelay.service %{buildroot}%{_unitdir}/dhcrelay.service
install -m0644 $RPM_SOURCE_DIR/dhcrelay6.service \ install -m0644 $RPM_SOURCE_DIR/dhcrelay6.service \
%{buildroot}%{_unitdir}/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 # rcservice links
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd6 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 -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig/network/scripts
install -m0755 $RPM_SOURCE_DIR/if-up.d.dhcpd-restart-hook \ install -m0755 $RPM_SOURCE_DIR/if-up.d.dhcpd-restart-hook \
%{buildroot}%{_sysconfdir}/sysconfig/network/scripts/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 \ ln -sf ../scripts/dhcpd-restart-hook \
%{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook
# slp support # slp support

View File

@ -102,7 +102,7 @@ dhcpv4_server_restart()
fi fi
if test "$restart_needed" = yes ; then if test "$restart_needed" = yes ; then
/etc/init.d/dhcpd try-restart @LIBEXECDIR@/dhcp/dhcpd -4 try-restart
fi fi
} }
dhcpv6_server_restart() dhcpv6_server_restart()
@ -140,7 +140,7 @@ dhcpv6_server_restart()
fi fi
if test "$restart_needed" = yes ; then if test "$restart_needed" = yes ; then
/etc/init.d/dhcpd6 try-restart @LIBEXECDIR@/dhcp/dhcpd -6 try-restart
fi fi
} }