diff --git a/postgresql.changes b/postgresql.changes index 9e040e0..74ff649 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Feb 22 07:46:53 UTC 2019 - Franck Bui + +- 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. + ------------------------------------------------------------------- Tue Feb 19 16:05:22 UTC 2019 - Reinhard Max diff --git a/postgresql.spec b/postgresql.spec index 28dcd2e..058310e 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -312,7 +312,7 @@ getent passwd postgres > /dev/null || # Save the "enabled" and "active" state across the transition of # ownership of postgresql.service from postgresql-init to # postgresql-server. -if [ "$FIRST_ARG" -ge 1 ]; then \ +if [ $1 -ge 1 ]; then \ if [ x$(systemctl is-enabled postgresql.service 2>/dev/null ||:) = "xenabled" ]; then touch %eflag fi