mirror of https://github.com/k3s-io/k3s
Fix: Add $SUDO prefix to transactional-update commands in install script (#10531)
* Fix: Add $SUDO prefix to transactional-update commands in install script This commit addresses an issue in the k3s install script where the transactional-update commands did not include the $SUDO variable. This omission caused the script to fail if sudo was not used. Adding the $SUDO prefix ensures that the script runs correctly in all environments. Signed-off-by: ChrisBeaker <christian.siebigteroth@suse.com> Signed-off-by: Derek Nola <derek.nola@suse.com>pull/10709/head
parent
22fb7049bd
commit
019b0afdd8
|
@ -669,7 +669,7 @@ EOF
|
||||||
: "${INSTALL_K3S_SKIP_START:=true}"
|
: "${INSTALL_K3S_SKIP_START:=true}"
|
||||||
fi
|
fi
|
||||||
# create the /var/lib/rpm-state in SLE systems to fix the prein selinux macro
|
# create the /var/lib/rpm-state in SLE systems to fix the prein selinux macro
|
||||||
${transactional_update_run} mkdir -p /var/lib/rpm-state
|
$SUDO ${transactional_update_run} mkdir -p /var/lib/rpm-state
|
||||||
;;
|
;;
|
||||||
coreos)
|
coreos)
|
||||||
rpm_installer="rpm-ostree --idempotent"
|
rpm_installer="rpm-ostree --idempotent"
|
||||||
|
@ -941,7 +941,7 @@ elif type zypper >/dev/null 2>&1; then
|
||||||
if [ "\${TRANSACTIONAL_UPDATE=false}" != "true" ] && [ -x /usr/sbin/transactional-update ]; then
|
if [ "\${TRANSACTIONAL_UPDATE=false}" != "true" ] && [ -x /usr/sbin/transactional-update ]; then
|
||||||
uninstall_cmd="transactional-update --no-selfupdate -d run \$uninstall_cmd"
|
uninstall_cmd="transactional-update --no-selfupdate -d run \$uninstall_cmd"
|
||||||
fi
|
fi
|
||||||
\$uninstall_cmd
|
$SUDO \$uninstall_cmd
|
||||||
rm -f /etc/zypp/repos.d/rancher-k3s-common*.repo
|
rm -f /etc/zypp/repos.d/rancher-k3s-common*.repo
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
10adf00df73b55e10b0e17dbf423f3b2707b8540c90cfa8b07c34f9688c23a30 install.sh
|
68ae766b4c4fd2c8032f712cdd346c8f9d1ae60eaeb4736a1155effda44ea23d install.sh
|
||||||
|
|
Loading…
Reference in New Issue