Merge pull request #1919 from bboozzoo/bboozzoo/console-conf-wrapper-sync
bin/console-conf-wrapper: use /run/console-conf, fix mode extraction
This commit is contained in:
commit
98ca9cdfa8
|
@ -26,7 +26,7 @@ fi
|
||||||
if [ -e "/var/lib/snapd/modeenv" ]; then
|
if [ -e "/var/lib/snapd/modeenv" ]; then
|
||||||
mode="$(sed -n 's/mode=\([^[:space:]]*\)/\1/p' /var/lib/snapd/modeenv)"
|
mode="$(sed -n 's/mode=\([^[:space:]]*\)/\1/p' /var/lib/snapd/modeenv)"
|
||||||
else
|
else
|
||||||
mode="$(sed 's/.*snapd_recovery_mode=\([^[:space:]]*\)[[:space:]].*/\1/' /proc/cmdline))"
|
mode="$(sed 's/.*snapd_recovery_mode=\([^[:space:]]*\)[[:space:]].*/\1/' /proc/cmdline)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${mode}" = "install" ]; then
|
if [ "${mode}" = "install" ]; then
|
||||||
|
@ -99,8 +99,8 @@ if snap routine console-conf-start --help >/dev/null 2>/dev/null; then
|
||||||
snap routine console-conf-start
|
snap routine console-conf-start
|
||||||
fi
|
fi
|
||||||
# preapre host finger prints for console-conf as it cannot access sshd or host keys
|
# preapre host finger prints for console-conf as it cannot access sshd or host keys
|
||||||
mkdir -p /run/console_conf
|
mkdir -p /run/console-conf
|
||||||
/usr/share/subiquity/console-conf-write-login-details --host-fingerprints > /run/console_conf/host-fingerprints.txt
|
/usr/share/subiquity/console-conf-write-login-details --host-fingerprints > /run/console-conf/host-fingerprints.txt
|
||||||
snap run console-conf "$@"
|
snap run console-conf "$@"
|
||||||
rval=$?
|
rval=$?
|
||||||
if [ ! ${rval} -eq 0 ]; then
|
if [ ! ${rval} -eq 0 ]; then
|
||||||
|
|
Loading…
Reference in New Issue