[systemd-devel] Have custom agetty behaviour even after upgadres
Seblu
seblu at seblu.net
Tue May 8 15:01:14 PDT 2012
Hello,
on my archlinux test computer i would have first console not cleaned
and other spawned statically (crazy idea isn't it).
So I've turned NAutoVTs to 1 in /etc/systemd/systemd-logind.conf.
I've copied /usr/lib/systemd/system/getty at .service into
/etc/systemd/system/ and patched as following:
--- /usr/lib/systemd/system/getty at .service 2012-05-03 04:37:09.000000000 +0200
+++ /etc/systemd/system/getty at .service 2012-04-16 01:11:52.046979314 +0200
@@ -18,14 +18,14 @@
[Service]
Environment=TERM=linux
-ExecStart=-/sbin/agetty %I 38400
+ExecStart=-/sbin/agetty --noclear %I 38400
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
-TTYReset=yes
-TTYVHangup=yes
-TTYVTDisallocate=yes
+TTYReset=no
+TTYVHangup=no
+TTYVTDisallocate=no
KillMode=process
IgnoreSIGPIPE=no
After this i've symlink all my gettys in /etc/systemd/system/getty.target.wants
# cd /etc/systemd/system/getty.target.wants
# ls -l
total 0
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty1.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty2.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty3.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty4.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty5.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty6.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty7.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty8.service ->
../getty at .service
lrwxrwxrwx 1 root root 17 2012-03-12 22:40 getty at tty9.service ->
../getty at .service
My issue is at every systemd package upgrade, getty at tty1.service is
replaced by a new one linked to
/usr/lib/systemd/system/getty at .service.
And i loose my configuration.
I suggested to archlinux maintainer to flag as "backup"
getty at tty1.service to avoid this replacment. But it doesn't seems to
be a good solution.
Another solution was to remove getty at tty1.service from
/etc/systemd/system/ (in arch package). This works with static vt
allocation, but when NAutoVTs=0 (default), wihtout this file, there is
no tty1 console. It would be sad this is the main expected behaviour.
Why with autovt we need this file?
I'm also wondering if we keep in mind the smart hierarchy of
/usr/lib/systemd/system, /etc/systemd/system, /run/systemd/system, why
this file is not in /usr/lib/systemd/system/getty.target.wants? This
would let administrator override it cleanly.
Regards,
--
Sébastien Luttringer
www.seblu.net
More information about the systemd-devel
mailing list