From 62a6e6270fb0a14424ade62a24dbd143f398c99a Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 9 Feb 2018 15:08:51 +1300 Subject: [PATCH 1/2] shuffle subiquity service definition to a mix of a snapd-generated service file (not in this branch) and an overlay (in this branch) --- .../multi-user.target.wants/subiquity.service | 1 - .../subiquity.conf | 13 +++++++++ .../systemd/system/subiquity-debug@.service | 24 ---------------- .../lib/systemd/system/subiquity.service | 28 ------------------- 4 files changed, 13 insertions(+), 53 deletions(-) delete mode 120000 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/multi-user.target.wants/subiquity.service create mode 100644 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf delete mode 100644 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity-debug@.service delete mode 100644 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity.service diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/multi-user.target.wants/subiquity.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/multi-user.target.wants/subiquity.service deleted file mode 120000 index 4d9ea45c..00000000 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/multi-user.target.wants/subiquity.service +++ /dev/null @@ -1 +0,0 @@ -../subiquity.service \ No newline at end of file diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf new file mode 100644 index 00000000..76c1cb7f --- /dev/null +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf @@ -0,0 +1,13 @@ +[Unit] +IgnoreOnIsolate=yes +After=systemd-user-sessions.service plymouth-quit-wait.service + +[Service] +UtmpIdentifier=tty1 +TTYPath=/dev/tty1 +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes +KillMode=process +IgnoreSIGPIPE=no +SendSIGHUP=yes 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 deleted file mode 100644 index 3a7edb15..00000000 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity-debug@.service +++ /dev/null @@ -1,24 +0,0 @@ -[Unit] -Description=Subiquity debug shell %I -After=systemd-user-sessions.service plymouth-quit-wait.service -After=rc-local.service -IgnoreOnIsolate=yes -ConditionPathExists=/dev/tty0 -ConditionPathExists=!/run/subiquity/complete - -[Service] -Environment=PYTHONPATH=/usr/share/subiquity -ExecStartPre=/bin/systemctl stop getty@%I -ExecStart=/sbin/agetty -n --noclear -l /usr/share/subiquity/subiquity-debug %I $TERM -ExecStopPost=/bin/systemctl start getty@%I -Type=idle -Restart=always -RestartSec=0 -UtmpIdentifier=%I -TTYPath=/dev/%I -TTYReset=yes -TTYVHangup=yes -TTYVTDisallocate=yes -KillMode=process -IgnoreSIGPIPE=no -SendSIGHUP=yes 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 deleted file mode 100644 index 5357f04f..00000000 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity.service +++ /dev/null @@ -1,28 +0,0 @@ -[Unit] -Description=Subiquity, the installer for Ubuntu Server -After=systemd-user-sessions.service plymouth-quit-wait.service -After=rc-local.service -Requires=snapd.service -IgnoreOnIsolate=yes -ConditionPathExists=/dev/tty0 -ConditionPathExists=!/run/subiquity/complete - -[Service] -Environment=PYTHONPATH=/usr/share/subiquity -Environment=SNAP_REEXEC=0 -ExecStartPre=/bin/systemctl stop getty@tty1 -ExecStartPre=/bin/dmesg -n 1 -ExecStartPre=/snap/bin/subiquity.subiquity-loadkeys -ExecStart=/sbin/agetty -n --noclear -l /snap/bin/subiquity tty1 $TERM -ExecStopPost=/bin/systemctl start getty@tty1 -Type=idle -Restart=always -RestartSec=0 -UtmpIdentifier=tty1 -TTYPath=/dev/tty1 -TTYReset=yes -TTYVHangup=yes -TTYVTDisallocate=yes -KillMode=process -IgnoreSIGPIPE=no -SendSIGHUP=yes From b01a9b0d7aa6d681cd0c5703f02997a93e60b72e Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 13 Feb 2018 14:53:10 +1300 Subject: [PATCH 2/2] leave getty@tty1 in a state where it can be re-enabled --- .../lib/systemd/system/getty@tty1.service.d/conditional.conf | 2 ++ .../system/snap.subiquity.subquity-service.d/subiquity.conf | 1 + 2 files changed, 3 insertions(+) create mode 100644 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/getty@tty1.service.d/conditional.conf diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/getty@tty1.service.d/conditional.conf b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/getty@tty1.service.d/conditional.conf new file mode 100644 index 00000000..da3eed67 --- /dev/null +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/getty@tty1.service.d/conditional.conf @@ -0,0 +1,2 @@ +[Unit] +ConditionPathExists=/run/subiquity/complete \ No newline at end of file diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf index 76c1cb7f..9ae26356 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/snap.subiquity.subquity-service.d/subiquity.conf @@ -1,6 +1,7 @@ [Unit] IgnoreOnIsolate=yes After=systemd-user-sessions.service plymouth-quit-wait.service +ConditionPathExists=!/run/subiquity/complete [Service] UtmpIdentifier=tty1