Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1042472 > unrolled thread
| Started by | Michael Biebl <biebl@debian.org> |
|---|---|
| First post | 2021-01-14 15:10 +0100 |
| Last post | 2021-01-14 18:00 +0100 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.debian.bugs.dist
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Bug#977562: systemd: Incorrect order of agetty arguments in serial-getty@ttyS0.service definition file Michael Biebl <biebl@debian.org> - 2021-01-14 15:10 +0100
Bug#977562: systemd: Incorrect order of agetty arguments in serial-getty@ttyS0.service definition file Marcin Krol <mrkafk@gmail.com> - 2021-01-14 17:30 +0100
Bug#977562: systemd: Incorrect order of agetty arguments in serial-getty@ttyS0.service definition file Michael Biebl <biebl@debian.org> - 2021-01-14 17:40 +0100
Bug#977562: systemd: Incorrect order of agetty arguments in serial-getty@ttyS0.service definition file Karel Zak <kzak@redhat.com> - 2021-01-18 11:30 +0100
Bug#977562: systemd: Incorrect order of agetty arguments in serial-getty@ttyS0.service definition file Andreas Henriksson <andreas@fatal.se> - 2021-01-14 18:00 +0100
| From | Michael Biebl <biebl@debian.org> |
|---|---|
| Date | 2021-01-14 15:10 +0100 |
| Subject | Bug#977562: systemd: Incorrect order of agetty arguments in serial-getty@ttyS0.service definition file |
| Message-ID | <Bxbu1-1k7-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Am 19.12.20 um 16:47 schrieb Andreas Henriksson: > Control: tags -1 + moreinfo > > On Wed, Dec 16, 2020 at 11:39:06PM +0100, Michael Biebl wrote: >> Am 16.12.20 um 20:49 schrieb MK: >>> Package: systemd >>> Version: 241-7~deb10u5 >>> Severity: normal > [...] >>> Incorrect order of arguments to agetty in the serial-getty@ttyS0.service >>> unit file. >>> >>> It is: >>> >>> ExecStart=/sbin/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 xterm-256color >>> >>> >>> While it should be like: >>> >>> ExecStart=/sbin/agetty --autologin root -8 --keep-baud ttyS0 115200 xterm-256color > [...] >> According to the examples in man agetty, both should work. >> >> Andreas, can you comment here? >> If what MK is saying, should the "EXAMPLE" section in man agetty be updated? >> > > I don't really have much prior knowledge about *getty, but in my past > experience with other util-linux tools it is often the case that > (likely for historical reasons/compatibility) the arguments that > doesn't come in a dash-form is attempted to be accepted in either > order based on guessing which one was specified. In my past experience > something that was guessable in the past might in later years become > sometimes impossible to correctly guess right, so sticking with > what synopsis describes is usually the safest as far as I'm concerned. > > In the agetty case, the guessing is done here: > https://sources.debian.org/src/util-linux/2.36.1-2/term-utils/agetty.c/#L897 > > is_speed basically checks if the current argument only consists of > either 0-9 or ','. > > It is not obvious to me how it could go wrong in the example originally > described in this bug report. > > Please also note that for example sysvinit's inittab also uses getty > with arguments in both orders. > > Simply it should work either way. > > Please also note that the argument order is not the only thing changed. > It was also changed from specifying 3 speeds to only 1. > > Maybe the real issue here is that line speed detection isn't working? > I'd appreciate if the bug reporter could dive a bit deeper into the > problem. @MK any further feedback? Otherwise I would close this bug report. Regards, Michael
[toc] | [next] | [standalone]
| From | Marcin Krol <mrkafk@gmail.com> |
|---|---|
| Date | 2021-01-14 17:30 +0100 |
| Message-ID | <BxdFw-2zF-9@gated-at.bofh.it> |
| In reply to | #1042472 |
Well, I hoped that you'd simply change that order in the service file (I'm new to this, do you expect me to produce patch or something like that?). Otherwise serial comm doesn't work, at least for me. On 1/14/21 3:06 PM, Michael Biebl wrote: > Am 19.12.20 um 16:47 schrieb Andreas Henriksson: >> Control: tags -1 + moreinfo >> >> On Wed, Dec 16, 2020 at 11:39:06PM +0100, Michael Biebl wrote: >>> Am 16.12.20 um 20:49 schrieb MK: >>>> Package: systemd >>>> Version: 241-7~deb10u5 >>>> Severity: normal >> [...] >>>> Incorrect order of arguments to agetty in the >>>> serial-getty@ttyS0.service >>>> unit file. >>>> >>>> It is: >>>> >>>> ExecStart=/sbin/agetty --autologin root -8 --keep-baud >>>> 115200,38400,9600 ttyS0 xterm-256color >>>> >>>> >>>> While it should be like: >>>> >>>> ExecStart=/sbin/agetty --autologin root -8 --keep-baud ttyS0 115200 >>>> xterm-256color >> [...] >>> According to the examples in man agetty, both should work. >>> >>> Andreas, can you comment here? >>> If what MK is saying, should the "EXAMPLE" section in man agetty be >>> updated? >>> >> >> I don't really have much prior knowledge about *getty, but in my past >> experience with other util-linux tools it is often the case that >> (likely for historical reasons/compatibility) the arguments that >> doesn't come in a dash-form is attempted to be accepted in either >> order based on guessing which one was specified. In my past experience >> something that was guessable in the past might in later years become >> sometimes impossible to correctly guess right, so sticking with >> what synopsis describes is usually the safest as far as I'm concerned. >> >> In the agetty case, the guessing is done here: >> https://sources.debian.org/src/util-linux/2.36.1-2/term-utils/agetty.c/#L897 >> >> >> is_speed basically checks if the current argument only consists of >> either 0-9 or ','. >> >> It is not obvious to me how it could go wrong in the example originally >> described in this bug report. >> >> Please also note that for example sysvinit's inittab also uses getty >> with arguments in both orders. >> >> Simply it should work either way. >> >> Please also note that the argument order is not the only thing changed. >> It was also changed from specifying 3 speeds to only 1. >> >> Maybe the real issue here is that line speed detection isn't working? >> I'd appreciate if the bug reporter could dive a bit deeper into the >> problem. > > > @MK any further feedback? Otherwise I would close this bug report. > > Regards, > Michael > >
[toc] | [prev] | [next] | [standalone]
| From | Michael Biebl <biebl@debian.org> |
|---|---|
| Date | 2021-01-14 17:40 +0100 |
| Message-ID | <BxdPc-2CD-9@gated-at.bofh.it> |
| In reply to | #1042497 |
[Multipart message — attachments visible in raw view] — view raw
Karel, sorry for poking you directly: Could you weigh in here? Regards, Michael Am 14.01.21 um 17:21 schrieb Marcin Krol: > > Well, I hoped that you'd simply change that order in the service file > (I'm new to this, do you expect me to produce patch or something like > that?). Otherwise serial comm doesn't work, at least for me. > > > > > On 1/14/21 3:06 PM, Michael Biebl wrote: >> Am 19.12.20 um 16:47 schrieb Andreas Henriksson: >>> Control: tags -1 + moreinfo >>> >>> On Wed, Dec 16, 2020 at 11:39:06PM +0100, Michael Biebl wrote: >>>> Am 16.12.20 um 20:49 schrieb MK: >>>>> Package: systemd >>>>> Version: 241-7~deb10u5 >>>>> Severity: normal >>> [...] >>>>> Incorrect order of arguments to agetty in the >>>>> serial-getty@ttyS0.service >>>>> unit file. >>>>> >>>>> It is: >>>>> >>>>> ExecStart=/sbin/agetty --autologin root -8 --keep-baud >>>>> 115200,38400,9600 ttyS0 xterm-256color >>>>> >>>>> >>>>> While it should be like: >>>>> >>>>> ExecStart=/sbin/agetty --autologin root -8 --keep-baud ttyS0 115200 >>>>> xterm-256color >>> [...] >>>> According to the examples in man agetty, both should work. >>>> >>>> Andreas, can you comment here? >>>> If what MK is saying, should the "EXAMPLE" section in man agetty be >>>> updated? >>>> >>> >>> I don't really have much prior knowledge about *getty, but in my past >>> experience with other util-linux tools it is often the case that >>> (likely for historical reasons/compatibility) the arguments that >>> doesn't come in a dash-form is attempted to be accepted in either >>> order based on guessing which one was specified. In my past experience >>> something that was guessable in the past might in later years become >>> sometimes impossible to correctly guess right, so sticking with >>> what synopsis describes is usually the safest as far as I'm concerned. >>> >>> In the agetty case, the guessing is done here: >>> https://sources.debian.org/src/util-linux/2.36.1-2/term-utils/agetty.c/#L897 >>> >>> >>> is_speed basically checks if the current argument only consists of >>> either 0-9 or ','. >>> >>> It is not obvious to me how it could go wrong in the example originally >>> described in this bug report. >>> >>> Please also note that for example sysvinit's inittab also uses getty >>> with arguments in both orders. >>> >>> Simply it should work either way. >>> >>> Please also note that the argument order is not the only thing changed. >>> It was also changed from specifying 3 speeds to only 1. >>> >>> Maybe the real issue here is that line speed detection isn't working? >>> I'd appreciate if the bug reporter could dive a bit deeper into the >>> problem. >> >> >> @MK any further feedback? Otherwise I would close this bug report. >> >> Regards, >> Michael >> >>
[toc] | [prev] | [next] | [standalone]
| From | Karel Zak <kzak@redhat.com> |
|---|---|
| Date | 2021-01-18 11:30 +0100 |
| Message-ID | <ByzXk-3pt-1@gated-at.bofh.it> |
| In reply to | #1042499 |
On Thu, Jan 14, 2021 at 05:26:40PM +0100, Michael Biebl wrote:
> Karel,
>
> sorry for poking you directly: Could you weigh in here?
agetty accepts both:
agetty --help
Usage:
agetty [options] <line> [<baud_rate>,...] [<termtype>]
agetty [options] <baud_rate>,... <line> [<termtype>]
and code differentiates between these variants by digits, if the string
contains only "0123456789," than it <baud_rate>.
> > On 1/14/21 3:06 PM, Michael Biebl wrote:
> > > Am 19.12.20 um 16:47 schrieb Andreas Henriksson:
> > > > Control: tags -1 + moreinfo
> > > >
> > > > On Wed, Dec 16, 2020 at 11:39:06PM +0100, Michael Biebl wrote:
> > > > > Am 16.12.20 um 20:49 schrieb MK:
> > > > > > Package: systemd
> > > > > > Version: 241-7~deb10u5
> > > > > > Severity: normal
> > > > [...]
> > > > > > Incorrect order of arguments to agetty in the
> > > > > > serial-getty@ttyS0.service
> > > > > > unit file.
> > > > > >
> > > > > > It is:
> > > > > >
> > > > > > ExecStart=/sbin/agetty --autologin root -8 --keep-baud
> > > > > > 115200,38400,9600 ttyS0 xterm-256color
> > > > > >
> > > > > >
> > > > > > While it should be like:
> > > > > >
> > > > > > ExecStart=/sbin/agetty --autologin root -8 --keep-baud
> > > > > > ttyS0 115200 xterm-256color
> > > > [...]
> > > > > According to the examples in man agetty, both should work.
> > > > >
> > > > > Andreas, can you comment here?
> > > > > If what MK is saying, should the "EXAMPLE" section in man
> > > > > agetty be updated?
I think the man page is correct.
> > > > I don't really have much prior knowledge about *getty, but in my past
> > > > experience with other util-linux tools it is often the case that
> > > > (likely for historical reasons/compatibility) the arguments that
> > > > doesn't come in a dash-form is attempted to be accepted in either
> > > > order based on guessing which one was specified. In my past experience
> > > > something that was guessable in the past might in later years become
> > > > sometimes impossible to correctly guess right, so sticking with
> > > > what synopsis describes is usually the safest as far as I'm concerned.
> > > >
> > > > In the agetty case, the guessing is done here:
> > > > https://sources.debian.org/src/util-linux/2.36.1-2/term-utils/agetty.c/#L897
> > > >
> > > >
> > > > is_speed basically checks if the current argument only consists of
> > > > either 0-9 or ','.
Yes
> > > > It is not obvious to me how it could go wrong in the example originally
> > > > described in this bug report.
> > > >
> > > > Please also note that for example sysvinit's inittab also uses getty
> > > > with arguments in both orders.
> > > >
> > > > Simply it should work either way.
> > > >
> > > > Please also note that the argument order is not the only thing changed.
> > > > It was also changed from specifying 3 speeds to only 1.
> > > >
> > > > Maybe the real issue here is that line speed detection isn't working?
> > > > I'd appreciate if the bug reporter could dive a bit deeper into the
> > > > problem.
Yes.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
[toc] | [prev] | [next] | [standalone]
| From | Andreas Henriksson <andreas@fatal.se> |
|---|---|
| Date | 2021-01-14 18:00 +0100 |
| Message-ID | <Bxe8x-2IU-1@gated-at.bofh.it> |
| In reply to | #1042497 |
Hello Marcin Krol, On Thu, Jan 14, 2021 at 05:21:17PM +0100, Marcin Krol wrote: > > Well, I hoped that you'd simply change that order in the service file (I'm > new to this, do you expect me to produce patch or something like that?). > Otherwise serial comm doesn't work, at least for me. As I tried to explain in my previous mail, I'm claiming that: a/ it's impossible the ordering fixed your problem (I actually hacked up agetty to print out the structure the command-line parsing is stored into and verified that the structure ends up exactly the same no matter which order you give the arguments in. Before doing that I also checked the code and could not see any reason why the argument ordering detection code would not work.) b/ You changed (atleast) 2 things, not only the order. (For example, in your example with order reversed you also dropped all alternative speed settings and just gave a single speed setting instead of a list.) Given this there's no evidence that implementing your suggested change will fix anything. Please provide more input. Try to change one thing at a time in your testing to isolate which change actually fixes your problem. Regards, Andreas Henriksson
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.bugs.dist
csiph-web