[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd.
From:       Ivan Shmakov <oneingray () gmail ! com>
Date:       2013-07-11 7:38:52
Message-ID: 878v1dwnoz.fsf () violet ! siamics ! net
[Download RAW message or body]

>>>>> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic