diff --git a/debian/rules b/debian/rules index 3cb7a502..f11ef020 100755 --- a/debian/rules +++ b/debian/rules @@ -31,12 +31,15 @@ override_dh_installinit: mkdir $(CURDIR)/debian/console-conf/lib/systemd/system/serial-getty@.service.d/ install -m 0644 $(CURDIR)/debian/console-conf-serial.conf $(CURDIR)/debian/console-conf/lib/systemd/system/serial-getty@.service.d/ dh_installinit --no-start --name=subiquity + dh_installinit --no-start --name=serial-subiquity@ dh_installinit --no-start --name=subiquity-debug@ mkdir $(CURDIR)/debian/subiquity/lib/systemd/system/getty@tty1.service.d/ install -m 0644 $(CURDIR)/debian/subiquity-tty1.conf $(CURDIR)/debian/subiquity/lib/systemd/system/getty@tty1.service.d/ mkdir $(CURDIR)/debian/subiquity/lib/systemd/system/getty@.service.d/ install -m 0644 $(CURDIR)/debian/subiquity-ttyN.conf $(CURDIR)/debian/subiquity/lib/systemd/system/getty@.service.d/ ln -s /dev/null $(CURDIR)/debian/subiquity/lib/systemd/system/subiquity-debug@tty1.service + mkdir $(CURDIR)/debian/subiquity/lib/systemd/system/serial-getty@.service.d/ + install -m 0644 $(CURDIR)/debian/subiquity-serial.conf $(CURDIR)/debian/subiquity/lib/systemd/system/serial-getty@.service.d/ override_dh_auto_test: @echo "No tests." diff --git a/debian/subiquity-serial.conf b/debian/subiquity-serial.conf new file mode 100644 index 00000000..9aef8ee3 --- /dev/null +++ b/debian/subiquity-serial.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPre=/bin/systemctl start serial-subiquity@%i.service diff --git a/debian/subiquity.serial-subiquity@.service b/debian/subiquity.serial-subiquity@.service new file mode 100644 index 00000000..68753753 --- /dev/null +++ b/debian/subiquity.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