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

List:       debian-hurd
Subject:    Re: Bug#825975: sysvinit: Add missing poweroff on hurd-i386
From:       Richard Braun <rbraun () sceen ! net>
Date:       2019-01-11 14:50:51
Message-ID: 20190111145050.GA7311 () shattrath
[Download RAW message or body]

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.

-- 
Richard Braun

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

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