diff --git a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh index a2ad7607af..ed09524e3c 100755 --- a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh +++ b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh @@ -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=$? @@ -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 @@ -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 @@ -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 #######