Skip to content

Commit

Permalink
Escape backticks (#304)
Browse files Browse the repository at this point in the history
* Escape backticks

The commands between them are actually evaluated, leading to lots of
confusing help output in the log file.

* Revert change on one line

---------

Co-authored-by: nephros <nemo@geminipda>
  • Loading branch information
nephros and nephros authored Mar 28, 2024
1 parent f90c44d commit 83ed518
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/harbour-storeman-installer
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ source /etc/os-release; logentry="[Debug] From /etc/os-release: $ID $VERSION_ID
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 7 printf '%s' "$logentry"

ssus="$(ssu s | grep -iv 'UID:\? ')"; logentry='[Debug] `ssu status`, UID omitted:'
ssus="$(ssu s | grep -iv 'UID:\? ')"; logentry='[Debug] \`ssu status\`, UID omitted:'
printf '\n%s\n%s\n' "$(date -Iseconds) $logentry" "$ssus"
systemd-cat -t "$called" -p 7 printf '%s %s' "$logentry" "$(printf '%s' "$ssus" | sed 's/$/, /g' | tr -d '\n')"

Expand Down Expand Up @@ -143,7 +143,7 @@ do
logentry="[Warning] Failed to refresh harbour-storeman-obs repository, because error-code $retc was returned by: $logentry"
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 4 printf '%s' "$logentry"
logentry="[Notice] Trying to terminate (i.e., sending SIGTERM to) all processes named (ID) `pkcon`, then sleeping for $wait seconds."
logentry="[Notice] Trying to terminate (i.e., sending SIGTERM to) all processes named (ID) \`pkcon\`, then sleeping for $wait seconds."
printf '%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 5 printf '%s' "$logentry"
killall -q -TERM pkcon
Expand All @@ -156,7 +156,7 @@ do
logentry="[Error] Failed to refresh harbour-storeman-obs repository, because error-code $retc was returned by: $logentry"
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 3 printf '%s' "$logentry"
logentry="[Warning] Trying to interrupt (i.e., sending SIGINT to) all processes named (ID) `pkcon`, then sleeping for $wait seconds."
logentry="[Warning] Trying to interrupt (i.e., sending SIGINT to) all processes named (ID) \`pkcon\`, then sleeping for $wait seconds."
printf '%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 4 printf '%s' "$logentry"
killall -q -INT pkcon
Expand All @@ -170,7 +170,7 @@ do
logentry="[Error] Failed to refresh harbour-storeman-obs repository, because error-code $retc was returned by: $logentry"
printf '\n%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 3 printf '%s' "$logentry"
logentry="[Warning] Trying to hang-up (i.e., sending SIGHUP to) all processes named (ID) `pkcon`, then sleeping for $i seconds and ultimately killing them."
logentry="[Warning] Trying to hang-up (i.e., sending SIGHUP to) all processes named (ID) \`pkcon\`, then sleeping for $i seconds and ultimately killing them."
printf '%s\n' "$(date -Iseconds) $logentry"
systemd-cat -t "$called" -p 4 printf '%s' "$logentry"
killall -q -HUP pkcon
Expand Down

0 comments on commit 83ed518

Please sign in to comment.