Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-05 Thread Colin Guthrie
'Twas brillig, and Lennart Poettering at 04/06/13 14:41 did gyre and gimble:
> On Mon, 03.06.13 14:28, Karel Zak (k...@redhat.com) wrote:
> 
>>  * baud rate is optional and unnecessary for virtual terminals
>>  * term type is optional (default is 'linux' for virtual terminals
>>and 'vt102' for serial lines)
>>  * long options are more user-friendly
>>
>> ... all this is supported since util-linux v2.20 (Aug 2011).
> 
> Applied! Thanks.

Aww, pity the util-linux version wasn't corrected first to v2.23 first.
Ahh well as long as people remember... :)

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-04 Thread Karel Zak
On Tue, Jun 04, 2013 at 01:28:11PM +0200, Michal Schmidt wrote:
> On 06/04/2013 10:57 AM, Karel Zak wrote:
> >On Mon, Jun 03, 2013 at 06:00:45PM +0100, Colin Guthrie wrote:
> >> From comment 1:
> >>"Furthermore, I believe there's a bug in agetty. It attempts to detect
> >>the distinction between the vc and a serial line and set TERM
> >>accordingly, but it does not work as expected. I will send Karel a fix."
> >
> >  ... hmm, I don't remember any discussion.
> 
> The comment referred to the bug fixed by this util-linux commit:
> 
> commit c13d60b291cfe3e2c094225195d967c9f195ca54
> Author: Michal Schmidt 
> Date:   Mon Oct 29 23:33:01 2012 +0100
> 
> agetty: fix autodetection for TERM

 Ah, you're right. Thanks.

Karel


-- 
 Karel Zak  
 http://karelzak.blogspot.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-04 Thread Lennart Poettering
On Mon, 03.06.13 14:28, Karel Zak (k...@redhat.com) wrote:

>  * baud rate is optional and unnecessary for virtual terminals
>  * term type is optional (default is 'linux' for virtual terminals
>and 'vt102' for serial lines)
>  * long options are more user-friendly
> 
> ... all this is supported since util-linux v2.20 (Aug 2011).

Applied! Thanks.

> Signed-off-by: Karel Zak 

We don't use S-o-b in systemd.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-04 Thread Michal Schmidt

On 06/04/2013 10:57 AM, Karel Zak wrote:

On Mon, Jun 03, 2013 at 06:00:45PM +0100, Colin Guthrie wrote:

 From comment 1:
"Furthermore, I believe there's a bug in agetty. It attempts to detect
the distinction between the vc and a serial line and set TERM
accordingly, but it does not work as expected. I will send Karel a fix."


  ... hmm, I don't remember any discussion.


The comment referred to the bug fixed by this util-linux commit:

commit c13d60b291cfe3e2c094225195d967c9f195ca54
Author: Michal Schmidt 
Date:   Mon Oct 29 23:33:01 2012 +0100

agetty: fix autodetection for TERM

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-04 Thread Karel Zak
On Mon, Jun 03, 2013 at 06:00:45PM +0100, Colin Guthrie wrote:
> 'Twas brillig, and Karel Zak at 03/06/13 13:28 did gyre and gimble:
> >  * term type is optional (default is 'linux' for virtual terminals
> >and 'vt102' for serial lines)
> 
> It may no longer matter (especially if the fix mentioned by Michael in
> comment 1 of the bug quoted below is now merged) but FYI the "linux"
> term type was specified explicitly due to agetty not respecting TERM env
> var:

 agetty has been never designed in this way
 
> commit 2161de72c517d34d1ceb9b4c1a300f0b54ce5a9c
> Author: Michal Schmidt 
> Date:   Mon Oct 29 21:59:34 2012 +0100
> 
> units: agetty overrides TERM
> 
> Environment=TERM=... has no effect on agetty who sets it by itself. To
> really set TERM to a specified value, it has to be given on the command
> line.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=870622
> 
> 
> From comment 1:
> "Furthermore, I believe there's a bug in agetty. It attempts to detect
> the distinction between the vc and a serial line and set TERM
> accordingly, but it does not work as expected. I will send Karel a fix."

 ... hmm, I don't remember any discussion.
 
 Add term name to the command line is very poor workaround, distinction
 between the vc and a serial line is critical thing for agetty as it
 modifies many settings on the line.

Karel

-- 
 Karel Zak  
 http://karelzak.blogspot.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-03 Thread Colin Guthrie
'Twas brillig, and Karel Zak at 03/06/13 13:28 did gyre and gimble:
>  * term type is optional (default is 'linux' for virtual terminals
>and 'vt102' for serial lines)

It may no longer matter (especially if the fix mentioned by Michael in
comment 1 of the bug quoted below is now merged) but FYI the "linux"
term type was specified explicitly due to agetty not respecting TERM env
var:


commit 2161de72c517d34d1ceb9b4c1a300f0b54ce5a9c
Author: Michal Schmidt 
Date:   Mon Oct 29 21:59:34 2012 +0100

units: agetty overrides TERM

Environment=TERM=... has no effect on agetty who sets it by itself. To
really set TERM to a specified value, it has to be given on the command
line.

https://bugzilla.redhat.com/show_bug.cgi?id=870622


>From comment 1:
"Furthermore, I believe there's a bug in agetty. It attempts to detect
the distinction between the vc and a serial line and set TERM
accordingly, but it does not work as expected. I will send Karel a fix."

If it's all addressed, then it might be worth mentioning that it needs
an updated version (and not the v2.20 version you detailed) or that
Michal's interpretation was incorrect etc.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-03 Thread Karel Zak
 * baud rate is optional and unnecessary for virtual terminals
 * term type is optional (default is 'linux' for virtual terminals
   and 'vt102' for serial lines)
 * long options are more user-friendly

... all this is supported since util-linux v2.20 (Aug 2011).

Signed-off-by: Karel Zak 
---
 units/getty@.service.m4| 2 +-
 units/serial-getty@.service.m4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
index 083eb97..f32ca99 100644
--- a/units/getty@.service.m4
+++ b/units/getty@.service.m4
@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0
 
 [Service]
 # the VT is cleared by TTYVTDisallocate
-ExecStart=-/sbin/agetty --noclear %I 38400 linux
+ExecStart=-/sbin/agetty --noclear %I
 Type=idle
 Restart=always
 RestartSec=0
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
index 60d7737..5e16963 100644
--- a/units/serial-getty@.service.m4
+++ b/units/serial-getty@.service.m4
@@ -22,7 +22,7 @@ Before=getty.target
 IgnoreOnIsolate=yes
 
 [Service]
-ExecStart=-/sbin/agetty -s %I 115200,38400,9600 vt102
+ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
 Type=idle
 Restart=always
 RestartSec=0
-- 
1.8.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel