Page 1 sur 1
[systemd][agetty] nouvelle ligne avant /etc/issue (résolu)
Publié : sam. 17 mai 2014, 23:35
par iluso
Salut, salut !
Je cherche à ne pas afficher de saut de ligne avant le contenu de
/etc/issue
sur mon
tty1
.
En fouillant un peu, j'ai trouvé que l'option d'
agetty
à utiliser est
--nonewline
donc j'ai créé le fichier suivant :
Code : Tout sélectionner
$ cat /etc/systemd/system/getty@tty1.service.d/noclear.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --nonewline --noclear %I 38400 linux
Et là c'est le drame, écran noir au redémarrage. J’imagine que j'ajoute le paramètre au mauvais endroit... En faisant la même chose sur
getty@.service
directement ça me donne le même résultat.
Une idée ? Merci
Re: [systemd][agetty] nouvelle ligne avant /etc/issue
Publié : sam. 17 mai 2014, 23:52
par benjarobin
Intéressant en effet, j'obtiens ceci :
Code : Tout sélectionner
# systemctl status -l getty@tty5.service
● getty@tty5.service - Getty on tty5
Loaded: loaded (/usr/lib/systemd/system/getty@.service; disabled)
Active: failed (Result: start-limit) since sam. 2014-05-17 23:50:13 CEST; 56s ago
Docs: man:agetty(8)
man:systemd-getty-generator(8)
http://0pointer.de/blog/projects/serial-console.html
Process: 14538 ExecStart=/sbin/agetty --nonewline --noclear %I $TERM (code=exited, status=1/FAILURE)
Main PID: 14538 (code=exited, status=1/FAILURE)
mai 17 23:50:13 benjarobin-asus systemd[1]: getty@tty5.service has no holdoff time, scheduling restart.
mai 17 23:50:13 benjarobin-asus systemd[1]: Stopping Getty on tty5...
mai 17 23:50:13 benjarobin-asus systemd[1]: Starting Getty on tty5...
mai 17 23:50:13 benjarobin-asus systemd[1]: getty@tty5.service start request repeated too quickly, refusing to start.
mai 17 23:50:13 benjarobin-asus systemd[1]: Failed to start Getty on tty5.
mai 17 23:50:13 benjarobin-asus systemd[1]: Unit getty@tty5.service entered failed state.
Code : Tout sélectionner
# journalctl --no-pager -b -u getty@tty5.service
-- Logs begin at sam. 2013-10-12 00:20:12 CEST, end at sam. 2014-05-17 23:52:49 CEST. --
mai 17 23:49:57 benjarobin-asus systemd[1]: Starting Getty on tty5...
mai 17 23:49:57 benjarobin-asus systemd[1]: Started Getty on tty5.
mai 17 23:49:57 benjarobin-asus agetty[14497]: Usage:
mai 17 23:49:57 benjarobin-asus agetty[14497]: agetty [options] <line> [<baud_rate>,...] [<termtype>]
mai 17 23:49:57 benjarobin-asus agetty[14497]: agetty [options] <baud_rate>,... <line> [<termtype>]
mai 17 23:49:57 benjarobin-asus agetty[14497]: Options:
mai 17 23:49:57 benjarobin-asus agetty[14497]: -8, --8bits assume 8-bit tty
mai 17 23:49:57 benjarobin-asus agetty[14497]: -a, --autologin <user> login the specified user automatically
mai 17 23:49:57 benjarobin-asus agetty[14497]: -c, --noreset do not reset control mode
mai 17 23:49:57 benjarobin-asus agetty[14497]: -E, --remote use -r <hostname> for login(1)
mai 17 23:49:57 benjarobin-asus agetty[14497]: -f, --issue-file <file> display issue file
mai 17 23:49:57 benjarobin-asus agetty[14497]: -h, --flow-control enable hardware flow control
mai 17 23:49:57 benjarobin-asus agetty[14497]: -H, --host <hostname> specify login host
mai 17 23:49:57 benjarobin-asus agetty[14497]: -i, --noissue do not display issue file
mai 17 23:49:57 benjarobin-asus agetty[14497]: -I, --init-string <string> set init string
mai 17 23:49:57 benjarobin-asus agetty[14497]: -l, --login-program <file> specify login program
mai 17 23:49:57 benjarobin-asus agetty[14497]: -L, --local-line[=<mode>] control the local line flag
mai 17 23:49:57 benjarobin-asus agetty[14497]: -m, --extract-baud extract baud rate during connect
mai 17 23:49:57 benjarobin-asus agetty[14497]: -n, --skip-login do not prompt for login
mai 17 23:49:57 benjarobin-asus agetty[14497]: -o, --login-options <opts> options that are passed to login
mai 17 23:49:57 benjarobin-asus agetty[14497]: -p, --login-pause wait for any key before the login
mai 17 23:49:57 benjarobin-asus agetty[14497]: -r, --chroot <dir> change root to the directory
mai 17 23:49:57 benjarobin-asus agetty[14497]: -R, --hangup do virtually hangup on the tty
mai 17 23:49:57 benjarobin-asus agetty[14497]: -s, --keep-baud try to keep baud rate after break
mai 17 23:49:57 benjarobin-asus agetty[14497]: -t, --timeout <number> login process timeout
mai 17 23:49:57 benjarobin-asus agetty[14497]: -U, --detect-case detect uppercase terminal
mai 17 23:49:57 benjarobin-asus agetty[14497]: -w, --wait-cr wait carriage-return
mai 17 23:49:57 benjarobin-asus agetty[14497]: --noclear do not clear the screen before prompt
mai 17 23:49:57 benjarobin-asus agetty[14497]: --nohints do not print hints
mai 17 23:49:57 benjarobin-asus agetty[14497]: --nonewline do not print a newline before issue
mai 17 23:49:57 benjarobin-asus agetty[14497]: --nohostname no hostname at all will be shown
mai 17 23:49:57 benjarobin-asus agetty[14497]: --long-hostname show full qualified hostname
mai 17 23:49:57 benjarobin-asus agetty[14497]: --erase-chars <string> additional backspace chars
mai 17 23:49:57 benjarobin-asus agetty[14497]: --kill-chars <string> additional kill chars
mai 17 23:49:57 benjarobin-asus agetty[14497]: --help display this help and exit
mai 17 23:49:57 benjarobin-asus agetty[14497]: --version output version information and exit
mai 17 23:49:57 benjarobin-asus agetty[14497]: For more details see agetty(8).
mai 17 23:49:57 benjarobin-asus systemd[1]: getty@tty5.service has no holdoff time, scheduling restart.
mai 17 23:49:57 benjarobin-asus systemd[1]: Stopping Getty on tty5...
==> En gros l'option n'est pas reconnu...
Elle n'est pas implémenté... Un oubli que personne n'a constaté... Introduit à la révision :
https://github.com/karelzak/util-linux/ ... s/agetty.c
Re: [systemd][agetty] nouvelle ligne avant /etc/issue
Publié : dim. 18 mai 2014, 00:53
par iluso
Il manque ça dans la boucle donc ?
Re: [systemd][agetty] nouvelle ligne avant /etc/issue
Publié : dim. 18 mai 2014, 01:10
par benjarobin
Non en version 2.24 l'option n'est pas implémenté : elle est présente dans le code uniquement en lecture, lors de la lecture des options, le flag indiquant que cette option est passé n'est pas activé...
Je créé le patch (testé et cela fonctionne), le rapport de bug, etc...
Edit: Oui il manque ceci dans la boucle

Tient une personne ayant des bases (ou plus que cela) en C
Je m'occupe de tout, pas besoin d'être 2 sur le rapport de bug

Re: [systemd][agetty] nouvelle ligne avant /etc/issue
Publié : dim. 18 mai 2014, 01:19
par iluso
Tient une personne ayant des bases (ou plus que cela) en C
Des bases, rien de plus
Je créé le patch, le rapport de bug, etc...
Je m'occupe de tout
Super, merci !
Edit: je passe le sujet en résolu.
Re: [systemd][agetty] nouvelle ligne avant /etc/issue
Publié : dim. 18 mai 2014, 02:12
par benjarobin
Re: [systemd][agetty] nouvelle ligne avant /etc/issue (résol
Publié : dim. 18 mai 2014, 02:45
par iluso
Hop, j'ai compilé agetty
, l'option est bien intégrée, tout est nickel !
Beau travail !