Bug#865223: acct: new init script is broken
Marcos Fouces
marcos.fouces at gmail.com
Tue Jun 27 21:33:18 UTC 2017
Hello Lukas and team,
i just commited a new revision of acct with an improved init script.
Please review it and tell me if any more work is needed.
Greetings,
Marcos
El 22/06/17 a las 00:41, Lukas Schwaighofer escribió:
> Hi Marcos,
>
> did you look at that bug already:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865223
>
> I just checked your init script and it seems all but finished:
>
> * DAEMON_ARGS is undefined, should probably be:
> DAEMON_ARGS="/var/log/account/pacct"
> * you source /etc/default/acct and set the two variables if they do not
> exist, but you do not actually use either of those two variables
> * function do_start(): if the --test run fails, you return 1, which
> will then be interpreted by the case as success? That doesn't seem
> right to me. What do you want to achieve here? Maybe add a comment
> as at least to me this is not straight forward.
> * function do_stop():
> - why do you add --oknodo on the second invocation if you allow the
> exit code 1 anyways?
> - in case the first call to start-stop-daemon failed, but the second
> succeeds, shouldn't you return RETVAL from the second one?
> - you're not clearing the $PIDFILE in all cases (I don't know if that
> was your intention…)
> * the do_reload() function doesn't seem to be used
> * the nested case for the restart|force-reload case has a different
> handling of the return values of do_start…
>
> Regards
> Lukas
More information about the Pkg-security-team
mailing list