Skip to content

Commit

Permalink
deal with shellcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Hecko committed Aug 15, 2024
1 parent 63b0a84 commit 4a1313e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ do_upgrade() {
# NOTE: in case we would need to run leapp before pivot, we would need to
# specify where the root is, e.g. --root=/sysroot
# TODO: update: systemd-nspawn

# NOTE: We disable shell-check since we want to word-break NSPAWN_OPTS
# shellcheck disable=SC2046
/usr/bin/systemd-nspawn $NSPAWN_OPTS -D "$NEWROOT" /usr/bin/bash -c "mount -a; $LEAPPBIN upgrade --resume $args"
rv=$?

Expand Down Expand Up @@ -249,6 +252,9 @@ do_upgrade() {
# all FSTAB partitions. As mount was working before, hopefully will
# work now as well. Later this should be probably modified as we will
# need to handle more stuff around storage at all.

# NOTE: We disable shell-check since we want to word-break NSPAWN_OPTS
# shellcheck disable=SC2046
/usr/bin/systemd-nspawn $NSPAWN_OPTS -D "$NEWROOT" /usr/bin/bash -c "mount -a; /usr/bin/python3 -B $LEAPP3_BIN upgrade --resume $args"
rv=$?
fi
Expand Down Expand Up @@ -303,6 +309,8 @@ save_journal() {
local store_cmd="mount -a"
local store_cmd="$store_cmd; cat /tmp-leapp-upgrade.log >> /var/log/leapp/leapp-upgrade.log"

# NOTE: We disable shell-check since we want to word-break NSPAWN_OPTS
# shellcheck disable=SC2046
/usr/bin/systemd-nspawn $NSPAWN_OPTS -D "$NEWROOT" /usr/bin/bash -c "$store_cmd"

rm -f $logfile
Expand All @@ -317,7 +325,7 @@ save_journal() {
# during the kernel-core rpm postscript.
# the result is ro-bind-mounted over /proc/cmdline inside the container.
awk '{print $1}' /proc/cmdline \
| xargs -I@ echo @ $(cat "${NEWROOT}"/var/lib/leapp/.fakerootfs) \
| xargs -I@ echo @ "$(cat "${NEWROOT}"/var/lib/leapp/.fakerootfs)" \
> ${NEWROOT}/var/lib/leapp/.fakecmdline

##### do the upgrade #######
Expand Down

0 comments on commit 4a1313e

Please sign in to comment.