subiquity/bin/subiquity-service

25 lines
774 B
Plaintext
Raw Normal View History

#!/bin/sh
2019-03-20 23:28:02 +00:00
port=tty1
export PYTHONPATH=$SNAP/lib/python3.8/site-packages
2019-03-20 23:28:02 +00:00
if [ -n "$1" ]; then
port=$1
fi
# Stops some dmesg from overwriting the TUI.
/bin/dmesg -n 1
# Stop the systemd service completion messages from doing the same.
# The systemd(1) manpage documents SIGRTMIN+21 as a method to set
# show_status=0. Without this, ongoing services such as the casper-md5check
# can result in service status message being written on top of the TUI.
/bin/kill "-SIGRTMIN+21" 1
2019-03-20 23:28:02 +00:00
if [ "$port" = "tty1" ]; then
$SNAP/bin/subiquity-loadkeys
2019-03-20 23:28:02 +00:00
setfont $SNAP/subiquity.psf
exec /sbin/agetty -n --noclear -l $PYTHON -o $SNAP/usr/bin/subiquity $port $TERM
2019-03-20 23:28:02 +00:00
else
exec /sbin/agetty -n --keep-baud -l $PYTHON -o "$SNAP/usr/bin/subiquity --serial" $port 115200,38400,9600 $TERM
2019-03-20 23:28:02 +00:00
fi