mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-24 16:43:21 +01:00
Rationalize init logs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
76b9ef7005
commit
4365b83b15
@ -336,12 +336,14 @@ if [ -z "$PREFIX" ]; then
|
||||
ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init
|
||||
fi
|
||||
|
||||
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
||||
if [ -z "$PREFIX" ]; then
|
||||
touch /var/log/shorewall-lite-init.log
|
||||
|
||||
if [ -n "$first_install" ]; then
|
||||
if [ -n "$DEBIAN" ]; then
|
||||
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
|
||||
ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite
|
||||
echo "Shorewall Lite will start automatically at boot"
|
||||
touch /var/log/shorewall-init.log
|
||||
else
|
||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||
if insserv /etc/init.d/shorewall-lite ; then
|
||||
@ -366,6 +368,7 @@ if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
||||
cant_autostart
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
/var/log/shorewall-init.log {
|
||||
/var/log/shorewall-lite-init.log {
|
||||
missingok
|
||||
notifempty
|
||||
create 0600 root root
|
||||
|
@ -264,6 +264,7 @@ fi
|
||||
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
|
||||
|
||||
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
|
||||
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall-lite-init.log' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
|
||||
|
||||
if [ ! -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
|
||||
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf
|
||||
|
@ -334,12 +334,14 @@ if [ -z "$PREFIX" ]; then
|
||||
ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init
|
||||
fi
|
||||
|
||||
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
||||
if [ -z "$PREFIX" ]; then
|
||||
touch /var/log/shorewall6-lite-init.log
|
||||
|
||||
if [ -n "$first_install" ]; then
|
||||
if [ -n "$DEBIAN" ]; then
|
||||
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
|
||||
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
|
||||
echo "Shorewall6 Lite will start automatically at boot"
|
||||
touch /var/log/shorewall-init.log
|
||||
else
|
||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||
if insserv /etc/init.d/shorewall6-lite ; then
|
||||
@ -364,6 +366,7 @@ if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
||||
cant_autostart
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
/var/log/shorewall6-init.log {
|
||||
/var/log/shorewall6-lite-init.log {
|
||||
missingok
|
||||
notifempty
|
||||
create 0600 root root
|
||||
|
@ -256,7 +256,8 @@ fi
|
||||
#
|
||||
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
|
||||
|
||||
qt mywhich perl && perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall6/configfiles:/usr/share/shorewall6|;' ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
|
||||
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall6/configfiles:/usr/share/shorewall6|;' ${PREFIX}/usr/share/shorewall6/configfiles/shorewall6.conf
|
||||
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall6-lite-init.log' ${PREFIX}/usr/share/shorewall/configfiles/shorewall.conf
|
||||
|
||||
if [ ! -f ${PREFIX}/etc/shorewall6/shorewall6.conf ]; then
|
||||
run_install $OWNERSHIP -m 0644 shorewall6.conf ${PREFIX}/etc/shorewall6/shorewall6.conf
|
||||
|
Loading…
Reference in New Issue
Block a user