From ee6def793c1a8b438f479c2365cb0fd8fbfcc9c8 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 18 Oct 2025 15:43:43 +0200 Subject: [PATCH] cli: add 'reboot' option to upgrade command Usually, when upgrading a system, you want to reboot it so the upgrade takes effect. This commit adds a 'reboot' option/flag, alongside the 'force' option, to facilitate this. Signed-off-by: Joachim Wiberg --- src/klish-plugin-infix/xml/infix.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/klish-plugin-infix/xml/infix.xml b/src/klish-plugin-infix/xml/infix.xml index 59831d7d..6f8faf8f 100644 --- a/src/klish-plugin-infix/xml/infix.xml +++ b/src/klish-plugin-infix/xml/infix.xml @@ -680,12 +680,18 @@ - + + force=${KLISH_PARAM_force:+--ignore-compatible} rauc install $force $KLISH_PARAM_URI + if [ $? -eq 0 -a -n "$KLISH_PARAM_reboot" ]; then + echo "Upgrade successful, rebooting..." + sleep 2 + reboot + fi