[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#825975: sysvinit: Add missing poweroff on hurd-i386



On 13 Jan 2019, at 13:31, Dmitry Bogatov <KAction@debian.org> wrote:
> [2019-01-11 15:50] Richard Braun <rbraun@sceen.net>
>> 
>> part       text/plain                1117
>> On Fri, Jan 11, 2019 at 12:37:16PM +0000, Dmitry Bogatov wrote:
>>> Dear colleagues, I seek your advice.
>>> 
>>> Samuel, as Debian GNU/Hurd user and
>>> Justin, as developer who wrote sysvinit-core.config,
>>> you may be the most knowledgable about issue.
>>> 
>>> I am trying to understand, what is the purpose of following code in
>>> sysvinit-core.config:
>>> 
>>> 	if [ "$(uname)" = GNU ]; then
>>> 	    db_set sysvinit/hurd-fix-inittab "true"
>>> 	    if echo '3e3693078d18d4696c83a76531433cd4  /etc/inittab' \
>>> 	      | md5sum --status --check -; then
>>> 	    # The file is unmodified, update it silently.
>>> 	    :
>>> 	    elif [ $(fgrep -c -e '/libexec/getty' /etc/inittab) -gt 0 ] || \
>>> 	        [ $(grep -c '^c:' /etc/inittab) -eq 0 ]; then
>>> 	        db_input low sysvinit/hurd-fix-inittab || true
>>> 	        db_go
>>> 	    fi
>>> 	fi
>>> 
>>> What is magic md5 '3e3693078d18d4696c83a76531433cd4'? What is the state
>>> of transition it was intended for?
>> 
>> That magic number is the md5 sum of the inittab file intended to be
>> updated. The script makes sure that the inittab content is the one
>> expected before updating it.
> 
> Probably, I was not clear enough. Of course, I understand "what" this
> code doing, I am asking "why" and whether this "why" is still
> up-to-date.

It's from 2013[1] (to switch /libexec/getty to /sbin/getty) and 2014[2] (to add
an entry for the Mach console itself). I would be inclined to say this code is
redundant, but IANA Hurd maintainer, merely a user/minor contributor.

James

[1] https://lists.debian.org/debian-hurd/2013/08/msg00054.html
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745260


Reply to: