[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd.
From: |
Ivan Shmakov |
Subject: |
Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd. |
Date: |
Thu, 11 Jul 2013 07:38:52 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
>>>>> Justus Winter <4winter@informatik.uni-hamburg.de> writes:
>>>>> Quoting Ivan Shmakov (2013-07-09 12:59:01)
>>>>> Justus Winter <4winter@informatik.uni-hamburg.de> writes:
[…]
>>> +if [ "$(uname)" = GNU ]; then
>>> + sed -i -e 's|/libexec/getty|/sbin/getty|' /etc/inittab
>> I don’t seem to understand. Shouldn’t it be the other way around?
(I think I’ve got it. Irrespective of the kernel, Debian uses
/sbin/getty, and never /libexec/getty.)
>> But overall, I doubt that this change is necessary. If the package
>> is being upgraded, the chances are that this defect was already
>> corrected by the user. And for the new installations, wasn’t this
>> issue already fixed?
> Yes, it is fixed for new installations. However, the inittab as
> shipped with the package is only installed as /etc/inittab if this
> file is non-existant. As the inittab file was formerly not used on
> Hurd systems, it is likely that users that are upgrading are not
> aware of this issue,
Do I understand it correctly that even though not used, a
(potentially broken) inittab was nevertheless shipped with some
package? That makes the fix reasonable, indeed.
> and not fixing that renders the system somewhat unusable. I'm aware
> that sed'ing around in the file is probably inappropriate, maybe we
> should just display a message instead?
Displaying a message (with or without applying the fix, or
asking the user to confirm it) will do no harm.
Please also note that while altering files under /etc, Debian
packaging customary retains the original file with a .dpkg-old
suffix. And if the change suggested wasn’t confirmed by the
user, a .dpkg-new file may be created instead. As in, e. g.:
rm -f -- /etc/inittab.dpkg-new
sed -e '/^[^#]/ s|/libexec/getty|/sbin/getty|' \
< /etc/inittab > /etc/inittab.dpkg-new
… display the message, ask for confirmation…
if … confirmed… ; then
## preserve the original file; replace with the new one
## FIXME: check how the other .postinst scripts do it
mv -- /etc/inittab /etc/inittab.dpkg-old \
&& mv -- /etc/inittab.dpkg-new /etc/inittab \
|| … signal an error…
fi
My suggestion would be to assume the fix as confirmed unless
DEBIAN_PRIORITY is set to low.
--
FSF associate member #7257 np. tt-jam.xm
- Re: [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness, (continued)
- [PATCH 7/8] sendsigs, killprocs: Disable on Hurd. killall5 kills essential processes., Justus Winter, 2013/07/09
- [PATCH 4/8] initscripts: add runsystem.sysv, Justus Winter, 2013/07/09
- [PATCH 5/8] initscripts: Disable rootcheck on Hurd, Justus Winter, 2013/07/09
- [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS., Justus Winter, 2013/07/09
- [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd., Justus Winter, 2013/07/09
- Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd., Pino Toscano, 2013/07/22
Re: patches for sysvinit, debian repository for testing, Samuel Thibault, 2013/07/15