You are not logged in.
Pages: 1
Adding
# Required-Start: $local_fs
to the test script makes it work as intended, my bad:
# cat /root/test.txt
Tue Apr 9 15:34:39 CEST 2024 stop
Tue Apr 9 15:34:56 CEST 2024 start
But still I don't understand why nftables does not load the ruleset on boot with:
# Default-Start: S
but it does with:
# Default-Start: 2 3 4 5
Are you sure the init script with this LSB header causes the script to run at boot, rather than merely giving the impression that it does?
### BEGIN INIT INFO
# Provides: nftables
# Required-Start: $local_fs $network $remote_fs $syslog
# Required-Stop: $local_fs $remote_fs $syslog
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: nftables firewall service
# Description: nftables firewall system service
### END INIT INFO
For reasons unknown, none of my Debians run the script at boot with
# Default-Start: S
I assume the issue may also exist on Devuan. This seems to be a general problem with all init scripts under Debian whose "Default-Start" tag is set to "S". For example, I created the test file
/etc/init.d/test.sh
with the following content:
#!/bin/bash
### BEGIN INIT INFO
# Provides: test
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: S
# Default-Stop: 0 1 6
# Short-Description: Test
# Description: Test
### END INIT INFO
echo $(date) "$@" >>/root/test.txt
and I enabled it with:
update-rc.d test.sh defaults
which results in these, and only these, rc symlinks being created:
rc0.d/K01test.sh
rc1.d/K01test.sh
rc6.d/K01test.sh
rcS.d/S01test.sh
After rebooting the system from an empty '/root/test.txt' file, the contents of
this file become:
Tue Apr 9 01:26:50 CEST 2024 stop
in which only one line is logged, corresponding to the time when I issued the
reboot command, with no follow-up lines after the reboot.
Pages: 1