[proftpd-basic] Standards & package scripts
Hilmar Preuße
hille42 at web.de
Tue Dec 19 07:56:09 UTC 2017
Hi all,
while preparing for the next upload, I've noticed that our package
scripts of proftpd-basic are not standard conformal for Standard version
=> 4.0.0. It says:
9.3.3.2
Packages must not call /etc/init.d scripts directly even as a
fallback, and instead must always use invoke-rc.d (which is essential
and shouldn’t require any conditional).
...however we do call the init scripts directly.
We could now fix the scripts...or simply remove these code snippets and
hand over the job to debhelper. I propose to do the latter.
Now I have some questions about our postinst script:
if [ -e "/etc/init.d/proftpd" ]; then
update-rc.d proftpd defaults 50 >/dev/null
if [ $DONTSTART -eq 0 ] ; then
set +e
proftpd -t >/dev/null 2>&1
if [ $? = 0 ]; then
set -e
invoke-rc.d proftpd start || true
else
echo "Cannot start proftpd, please check syntax of your
configuration file $CONF"
fi
fi
fi
1. We call "update-rc.d" w/ params "defaults 50". According to my test
[1] the value 50 is default anyway so it can simply be dropped. Correct?
2. I don't understand that DONTSTART test. AFAICT the variable DONTSTART
is set to 0 at the top of the script and then never touched again. So I
can't imagine a situation where DONTSTART should have a different value
than 0. So the test is surplus, correct?
3. We test for the correctness proftp configuration before we start the
init script. If we really need to do that (instead of simply start and
eventually fail) I suggest to move it to the init script and simplify
the postinst script.
Suggestions, critics? If not I'd implement the changes, two scripts can
be simplified, proftpd-basic.prerm is surplus and will be removed.
Hilmar
[1]
root at amd64-sid:~# update-rc.d proftpd defaults 50
root at amd64-sid:~# find /etc/ -name \*proftp\*|sort|xargs ls -l|grep rc
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc0.d/K01proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc1.d/K01proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc2.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc3.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc4.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc5.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc6.d/K01proftpd ->
../init.d/proftpd
root at amd64-sid:~# find /etc/ -name \*proftp\*|sort|grep rc |xargs rm
root at amd64-sid:~# update-rc.d proftpd defaults
root at amd64-sid:~# find /etc/ -name \*proftp\*|sort|xargs ls -l|grep rc
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc0.d/K01proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc1.d/K01proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc2.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc3.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc4.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc5.d/S03proftpd ->
../init.d/proftpd
lrwxrwxrwx 1 root root 17 Dec 19 08:19 /etc/rc6.d/K01proftpd ->
../init.d/proftpd
--
#206401 http://counter.li.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-proftpd-maintainers/attachments/20171219/4fda452b/attachment.sig>
More information about the Pkg-proftpd-maintainers
mailing list