On 17/08/14 12:48, Marco d'Itri wrote:
> On Aug 17, Marc Haber <mh+debian-de...@zugschlus.de> wrote:
>> It is not
>> always possible to come with a working default configuration or to
>> build one in postinst.
>
> If unconfigured software really cannot fail cleanly then the package can 
> install it without enabling the service.
> Or systemd can notice that there is no config file and hence not try to 
> start the daemon.

FYI: systemd:

[Unit]
ConditionPathExists=/etc/foo.conf

or sysvinit:

if ! [ -e /etc/foo.conf ]
then
    echo -n "(not starting, you need to create /etc/foo.conf)"
    return 0
fi

This seems better than the ENABLED=1 anti-pattern: start the service if
and only if it has been configured.

    S


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/53f09ca3.8080...@debian.org

Reply via email to