Vieri Di Paola
2017-04-05 10:07:26 UTC
Hi,
I've come across an issue regarding shorewall save.
All's well if I run this on the command line as root:
# /bin/sh /usr/sbin/shorewall save
Currently-running Configuration Saved to /var/lib/shorewall/restore
However, running the same command from a script called by init (/etc/inittab) makes it hang "forever".
While running, I can list the process:
# ps aux | grep shore
root 2591 0.0 0.0 13564 6472 ? S 10:24 0:00 /bin/sh /usr/sbin/shorewall save
I noted that the /var/lib/shorewall/restore file is found and complete (with the expected timestamp).
So "shorewall save" seems to at least successfully write the restore file.
However, it doesn't seem to exit.
A simple script to reproduce the issue can be this one:
# cat test.sh
#!/bin/bash
FWD=/tmp
while [ 1 ]; do
sleep 10
if [ -f ${FWD}/test ]; then
echo "$(date) - Saving..." >> ${FWD}/test.log
/usr/sbin/shorewall save
echo "$(date) - Done." >> ${FWD}/test.log
fi
done
exit 0
If I call it in /etc/inittab and touch /tmp/test then I will notice with "ps aux" that the "shorewall save" process never quits, BUT /var/lib/shorewall/restore is successfully created.
Any ideas?
# shorewall version
5.0.15.3
NB: I tested the same setup on another shorewall system and I had no issues there with the script called from inittab. The version there differs.
# shorewall version
5.0.14.1
I also updated the first box to:
# shorewall version
5.0.15.6
but I still have the same issue.
I haven't had time to test 5.1.
Vieri
I've come across an issue regarding shorewall save.
All's well if I run this on the command line as root:
# /bin/sh /usr/sbin/shorewall save
Currently-running Configuration Saved to /var/lib/shorewall/restore
However, running the same command from a script called by init (/etc/inittab) makes it hang "forever".
While running, I can list the process:
# ps aux | grep shore
root 2591 0.0 0.0 13564 6472 ? S 10:24 0:00 /bin/sh /usr/sbin/shorewall save
I noted that the /var/lib/shorewall/restore file is found and complete (with the expected timestamp).
So "shorewall save" seems to at least successfully write the restore file.
However, it doesn't seem to exit.
A simple script to reproduce the issue can be this one:
# cat test.sh
#!/bin/bash
FWD=/tmp
while [ 1 ]; do
sleep 10
if [ -f ${FWD}/test ]; then
echo "$(date) - Saving..." >> ${FWD}/test.log
/usr/sbin/shorewall save
echo "$(date) - Done." >> ${FWD}/test.log
fi
done
exit 0
If I call it in /etc/inittab and touch /tmp/test then I will notice with "ps aux" that the "shorewall save" process never quits, BUT /var/lib/shorewall/restore is successfully created.
Any ideas?
# shorewall version
5.0.15.3
NB: I tested the same setup on another shorewall system and I had no issues there with the script called from inittab. The version there differs.
# shorewall version
5.0.14.1
I also updated the first box to:
# shorewall version
5.0.15.6
but I still have the same issue.
I haven't had time to test 5.1.
Vieri