From 83ed518580304ff9e8631dafd8f4c1587b510648 Mon Sep 17 00:00:00 2001 From: Peter G Date: Thu, 28 Mar 2024 22:38:18 +0000 Subject: [PATCH] Escape backticks (#304) * 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 --- bin/harbour-storeman-installer | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/harbour-storeman-installer b/bin/harbour-storeman-installer index b4ebe71..264abd1 100644 --- a/bin/harbour-storeman-installer +++ b/bin/harbour-storeman-installer @@ -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')" @@ -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 @@ -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 @@ -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