Skip to content

Commit

Permalink
tree-wide: drop manually-crafted message for missing variables
Browse files Browse the repository at this point in the history
Bash will generate a very nice message for us:
/tmp/ff.sh: line 1: SOMEVAR: parameter null or not set

Let's save some keystrokes by not replacing this with our own inferior
messages.

[dtardon: Dropped changes to other files.]

(cherry picked from commit d7ff524)

Related: #2156620
  • Loading branch information
keszybz authored and dtardon committed Jul 13, 2023
1 parent 0548d91 commit a175e11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/TEST-15-DROPIN/test-dropin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
set -x

_clear_service () {
local SERVICE_NAME="${1:?_clear_service: missing argument}"
local SERVICE_NAME="${1:?}"
systemctl stop "$SERVICE_NAME.service" 2>/dev/null || :
rm -f /{etc,run,usr/lib}/systemd/system/"$SERVICE_NAME".service
rm -fr /{etc,run,usr/lib}/systemd/system/"$SERVICE_NAME".service.d
Expand All @@ -25,7 +25,7 @@ clear_services () {
}

create_service () {
local SERVICE_NAME="${1:?create_service: missing argument}"
local SERVICE_NAME="${1:?}"
clear_services "$SERVICE_NAME"

cat >/etc/systemd/system/"$SERVICE_NAME".service <<EOF
Expand Down

0 comments on commit a175e11

Please sign in to comment.