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

Spawn long-running process from maintainer script?



Hi,

a package I co-maintain, aide, has the following code in its postinst:

        start-stop-daemon --start --background --pidfile /dev/null \
        --startas /usr/sbin/aideinit -- $aideinitflags

This was originally borrowed from man-db, but man-db is using a perl
idiom nowadays since s-s-d is not available in debootstrap:

    perl -e '@pwd = getpwnam("man"); $) = $( = $pwd[3]; $> = $< = $pwd[2];
                 exec "/usr/bin/mandb", @ARGV' -- "$@" || true

aide has an ages old bug, #732133, which says that using
start-stop-daemon is a lintian warning since daemons should be started
with invoke-rc.d.

Aide, however, is not a daemon, and the database init process started
from postinst is a one-shot process running for several minutes and then
terminating.

What would be the recommended way to do this?

(1)
remove the aide database init process from the package completely since
it runs at a time when other packages are still being installed and the
new database is outdated the second it is created?

(2)
continue using s-s-d and silence the lintian warning

(3)
adopt the perl code from man-db

(4)
use some other idiom ("&"? A systemd one-shot unit? Something entirely
different?


what would you recommend?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: