[PATCH 1/2] make anaconda-shell.service a template, put it on tty2 & hvc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We're also passing "-l /bin/bash -o '--login'", which does the no-login
thing for us, so we can remove the silly hack where we replace
/bin/login with a shell script that runs bash.
---
 data/systemd/anaconda-shell.service |   13 ++++++++-----
 data/systemd/anaconda.target        |    1 +
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/data/systemd/anaconda-shell.service b/data/systemd/anaconda-shell.service
index 8d41146..78c07a3 100644
--- a/data/systemd/anaconda-shell.service
+++ b/data/systemd/anaconda-shell.service
@@ -1,16 +1,19 @@
+# anaconda-shell@.service
+# This is roughly equivalent to getty@.service, except with '-n' so we don't
+# spawn login
 [Unit]
-Description=Shell on tty2
-BindTo=dev-tty2.device
-After=dev-tty2.device
+Description=Shell on %I
+BindTo=dev-%i.device
+After=dev-%i.device
 
 [Service]
 Environment=TERM=linux
 WorkingDirectory=/
-ExecStart=-/sbin/agetty -n tty2 38400
+ExecStart=-/sbin/agetty -n -l /bin/bash -o '--login' %I 38400
 Restart=always
 RestartSec=0
 TimeoutSec=0
-TTYPath=/dev/tty2
+TTYPath=/dev/%i
 TTYReset=yes
 TTYVHangup=yes
 TTYVTDisallocate=yes
diff --git a/data/systemd/anaconda.target b/data/systemd/anaconda.target
index 1886399..ac6d6e1 100644
--- a/data/systemd/anaconda.target
+++ b/data/systemd/anaconda.target
@@ -4,3 +4,4 @@ Requires=basic.target
 Conflicts=rescue.service rescue.target
 After=basic.target rescue.service rescue.target
 AllowIsolate=yes
+Wants=anaconda-shell@tty2.service anaconda-shell@hvc1.service
-- 
1.7.6.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux