From 2ebe4ec60d43315806d357208a6159277f4e3557 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 15 Jan 2018 14:56:49 +1300 Subject: [PATCH 1/4] run subiquity on the serial console --- .../subiquity-serial.conf | 2 ++ .../systemd/system/serial-subiquity@.service | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-getty@.service.d/subiquity-serial.conf create mode 100644 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-getty@.service.d/subiquity-serial.conf b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-getty@.service.d/subiquity-serial.conf new file mode 100644 index 00000000..9aef8ee3 --- /dev/null +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-getty@.service.d/subiquity-serial.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPre=/bin/systemctl start serial-subiquity@%i.service diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service new file mode 100644 index 00000000..68753753 --- /dev/null +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service @@ -0,0 +1,30 @@ +[Unit] +Description=Subiquity, the installer for Ubuntu Server %I +BindsTo=dev-%i.device +After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service +After=rc-local.service +ConditionPathExists=!/run/subiquity/complete +StartLimitInterval=0 + +[Service] +Environment=PYTHONPATH=/usr/share/subiquity +ExecStartPre=/bin/systemctl stop serial-getty@%I +ExecStart=/sbin/agetty -n --keep-baud -l /usr/share/subiquity/subiquity-tui --login-options "--serial" 115200,38400,9600 %I $TERM +ExecStopPost=/bin/systemctl start serial-getty@%I +Type=idle +Restart=always +RestartSec=0 +UtmpIdentifier=%I +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +SendSIGHUP=yes + +#TTYVTDisallocate=yes +#KillMode=process +#Restart=always +#StandardInput=tty-force +#StandardOutput=tty +#StandardError=tty From ec1f465e2c0ea07f7b08fb730512b01f5d1cea4b Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 16 Jan 2018 13:14:46 +1300 Subject: [PATCH 2/4] fix path in serial-subiquity@.service --- .../overlay/lib/systemd/system/serial-subiquity@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service index 68753753..9d6c8b4d 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service @@ -9,7 +9,7 @@ StartLimitInterval=0 [Service] Environment=PYTHONPATH=/usr/share/subiquity ExecStartPre=/bin/systemctl stop serial-getty@%I -ExecStart=/sbin/agetty -n --keep-baud -l /usr/share/subiquity/subiquity-tui --login-options "--serial" 115200,38400,9600 %I $TERM +ExecStart=/sbin/agetty -n --keep-baud -l /snap/bin/subiquity --login-options "--serial" 115200,38400,9600 %I $TERM ExecStopPost=/bin/systemctl start serial-getty@%I Type=idle Restart=always From 47911d3221877264b3c6ccd6d2f16fdea9081367 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 17 Jan 2018 10:53:42 +1300 Subject: [PATCH 3/4] changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 843794e2..1fea6e08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.490) UNRELEASED; urgency=medium + + * Run subiquity on any serial consoles that the user told systemd + about. + + -- Michael Hudson-Doyle Wed, 17 Jan 2018 10:53:33 +1300 + livecd-rootfs (2.489) bionic; urgency=medium [ Balint Reczey ] From 6ca49ecf0fb725ea24a8da25da9a417a40eb77bf Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 31 Jan 2018 21:41:32 +1300 Subject: [PATCH 4/4] remove some commented out gunk from .service files --- .../overlay/lib/systemd/system/serial-subiquity@.service | 7 ------- .../overlay/lib/systemd/system/subiquity-debug@.service | 6 ------ .../overlay/lib/systemd/system/subiquity.service | 6 ------ 3 files changed, 19 deletions(-) diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service index 9d6c8b4d..d5d588ad 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service @@ -21,10 +21,3 @@ TTYVHangup=yes KillMode=process IgnoreSIGPIPE=no SendSIGHUP=yes - -#TTYVTDisallocate=yes -#KillMode=process -#Restart=always -#StandardInput=tty-force -#StandardOutput=tty -#StandardError=tty diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity-debug@.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity-debug@.service index 826e234d..3a7edb15 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity-debug@.service +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity-debug@.service @@ -22,9 +22,3 @@ TTYVTDisallocate=yes KillMode=process IgnoreSIGPIPE=no SendSIGHUP=yes - -#KillMode=process -#Restart=always -#StandardInput=tty-force -#StandardOutput=tty -#StandardError=tty diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity.service index 89d44bd2..5357f04f 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity.service +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity.service @@ -26,9 +26,3 @@ TTYVTDisallocate=yes KillMode=process IgnoreSIGPIPE=no SendSIGHUP=yes - -#KillMode=process -#Restart=always -#StandardInput=tty-force -#StandardOutput=tty -#StandardError=tty