bin/console-conf-wrapper: prefer use of snapd/modeenv when determining snapd mode
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
This commit is contained in:
parent
919ca5ebd4
commit
f55f2fc94a
|
@ -22,7 +22,14 @@ if [ -e /run/snapd-recovery-chooser-triggered ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q 'snapd_recovery_mode=install' /proc/cmdline ; then
|
# always prefer to use modeevn if it is available
|
||||||
|
if [ -e "/var/lib/snapd/modeenv" ]; then
|
||||||
|
mode="$(sed -n 's/mode=\([^[:space:]]*\)/\1/p' /var/lib/snapd/modeenv)"
|
||||||
|
else
|
||||||
|
mode="$(sed 's/.*snapd_recovery_mode=\([^[:space:]]*\)[[:space:]].*/\1/' /proc/cmdline))"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${mode}" = "install" ]; then
|
||||||
echo "Installing the system, please wait for reboot"
|
echo "Installing the system, please wait for reboot"
|
||||||
# XXX: replace with something more user friendly after the beta?
|
# XXX: replace with something more user friendly after the beta?
|
||||||
journalctl -u snapd.service -f
|
journalctl -u snapd.service -f
|
||||||
|
|
Loading…
Reference in New Issue