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

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



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


Reply to: