SHA256
1
0
forked from pool/dhcp

Accepting request 678162 from home:fbui:branches:network:dhcp

- Drop use of $FIRST_ARG in .spec
  The use of $FIRST_ARG was probably required because of the
  %service_* rpm macros were playing tricks with the shell positional
  parameters. This is bad practice and error prones so let's assume
  that no macros should do that anymore and hence it's safe to assume
  that positional parameters remains unchanged after any rpm macro
  call.

OBS-URL: https://build.opensuse.org/request/show/678162
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=192
This commit is contained in:
Reinhard Max 2019-03-05 16:24:38 +00:00 committed by Git OBS Bridge
parent 1ba334be32
commit 7d34fc9234
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 22 07:04:56 UTC 2019 - Franck Bui <fbui@suse.com>
- Drop use of $FIRST_ARG in .spec
The use of $FIRST_ARG was probably required because of the
%service_* rpm macros were playing tricks with the shell positional
parameters. This is bad practice and error prones so let's assume
that no macros should do that anymore and hence it's safe to assume
that positional parameters remains unchanged after any rpm macro
call.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 21 13:33:47 UTC 2019 - Jonathan Brielmaier <jbrielmaier@suse.de> Mon Jan 21 13:33:47 UTC 2019 - Jonathan Brielmaier <jbrielmaier@suse.de>

View File

@ -394,7 +394,7 @@ getent passwd dhcpd >/dev/null || useradd -r -g nogroup -s /bin/false -c "DHCP s
%service_add_post dhcpd.service %service_add_post dhcpd.service
%service_add_post dhcpd6.service %service_add_post dhcpd6.service
# FIXME: update? # FIXME: update?
if [ ${FIRST_ARG:-0} -gt 1 ]; then if [ $1 -gt 1 ]; then
if grep -q '^DHCPD_RUN_AS=.*nobody' etc/sysconfig/dhcpd; then if grep -q '^DHCPD_RUN_AS=.*nobody' etc/sysconfig/dhcpd; then
tmpfile=$(mktemp -q etc/sysconfig/dhcpd.XXXXXX) tmpfile=$(mktemp -q etc/sysconfig/dhcpd.XXXXXX)
sed 's|^DHCPD_RUN_AS=.*|DHCPD_RUN_AS="dhcpd"|' etc/sysconfig/dhcpd \ sed 's|^DHCPD_RUN_AS=.*|DHCPD_RUN_AS="dhcpd"|' etc/sysconfig/dhcpd \