Put in place for using ipfs use on shutdown and startup.
PR: 27070
This commit is contained in:
parent
d70e094301
commit
639e6db6e7
@ -73,6 +73,10 @@ ipnat_enable="NO" # Set to YES for ipnat; needs ipfilter, too!
|
||||
ipnat_program="/sbin/ipnat -CF -f" # program and how to specify rules file
|
||||
ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat
|
||||
ipnat_flags="" # additional flags for ipnat
|
||||
ipfs_enable="NO" # Set to YES to enable saving and restoring
|
||||
# of state tables at shutdown and boot
|
||||
ipfs_flags="" # additional flags for ipfs
|
||||
ipfs_program="/sbin/ipfs" # where the ipfs program lives
|
||||
ipmon_enable="NO" # Set to YES for ipmon; needs ipfilter, too!
|
||||
ipmon_program="/sbin/ipmon" # where the ipfilter monitor program lives
|
||||
ipmon_flags="-Ds" # typically "-Ds" or "-D /var/log/ipflog"
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -96,6 +96,15 @@ network_pass1() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "${ipfs_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
|
||||
echo -n ' ipfs';
|
||||
eval ${ipfs_program:-/sbin/ipfs -R} \
|
||||
${ipfs_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
ipfilter_enable="NO"
|
||||
echo -n ' NO IPF RULES'
|
||||
|
@ -124,6 +124,17 @@ case ${local_startup} in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Save IP Filter state tables
|
||||
|
||||
case ${ipfs_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n 'Saving IP Filter state tables:'
|
||||
eval ${ipfs_program:-/sbin/ipfs -W} ${ipfs_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
echo .
|
||||
|
||||
# Insert other shutdown procedures here
|
||||
|
||||
echo '.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user