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

Re: Conditional use of debconf



Bob Hilliard <hilliard@debian.org> writes:

>      I would like to use debconf to present a message to the admin
> when a package is installed, but only if certain text does not
> appear in a config file.  
> 
>      Without debconf, I could use code something like this in the
> [post|pre]inst:
> 
>      if !grep -q include /etc/dictd.conf
>        then
>        [Display message]
>      fi
> 
>      I can't find anything in the debconf documentation or the command
> available in /usr/share/doc/debian-policy/debconf_specification.txt.gz
> that would permit this type of conditional display of a message.  Is
> there something in the debconf documentation that I'm missing?

Within .config:

if !grep -q include /etc/dictd.conf
	db_input medium foo/bar-message || [ $? -eq 30 ]
	db_go
fi

Ciao
        Racke

-- 
For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)



Reply to: