mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-06 09:46:49 +02:00
Sort the output of 'show capabilities'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
da0261cb91
commit
24c69f9efb
@ -2442,7 +2442,7 @@ determine_capabilities() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
report_capabilities() {
|
report_capabilities_unsorted() {
|
||||||
report_capability() # $1 = Capability Description , $2 Capability Setting (if any)
|
report_capability() # $1 = Capability Description , $2 Capability Setting (if any)
|
||||||
{
|
{
|
||||||
local setting
|
local setting
|
||||||
@ -2453,8 +2453,6 @@ report_capabilities() {
|
|||||||
echo " " $1: $setting
|
echo " " $1: $setting
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $VERBOSITY -gt 1 ]; then
|
|
||||||
echo "$g_product has detected the following iptables/netfilter capabilities:"
|
|
||||||
report_capability "NAT (NAT_ENABLED)" $NAT_ENABLED
|
report_capability "NAT (NAT_ENABLED)" $NAT_ENABLED
|
||||||
report_capability "Packet Mangling (MANGLE_ENABLED)" $MANGLE_ENABLED
|
report_capability "Packet Mangling (MANGLE_ENABLED)" $MANGLE_ENABLED
|
||||||
report_capability "Multi-port Match (MULTIPORT)" $MULTIPORT
|
report_capability "Multi-port Match (MULTIPORT)" $MULTIPORT
|
||||||
@ -2554,21 +2552,25 @@ report_capabilities() {
|
|||||||
|
|
||||||
echo " Kernel Version (KERNELVERSION): $KERNELVERSION"
|
echo " Kernel Version (KERNELVERSION): $KERNELVERSION"
|
||||||
echo " Capabilities Version (CAPVERSION): $CAPVERSION"
|
echo " Capabilities Version (CAPVERSION): $CAPVERSION"
|
||||||
|
}
|
||||||
|
|
||||||
|
report_capabilities() {
|
||||||
|
|
||||||
|
if [ $VERBOSITY -gt 1 ]; then
|
||||||
|
echo "$g_product has detected the following iptables/netfilter capabilities:"
|
||||||
|
report_capabilities_unsorted | sort
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$PKTTYPE" ] || USEPKTTYPE=
|
[ -n "$PKTTYPE" ] || USEPKTTYPE=
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
report_capabilities1() {
|
report_capabilities_unsorted1() {
|
||||||
report_capability1() # $1 = Capability
|
report_capability1() # $1 = Capability
|
||||||
{
|
{
|
||||||
eval echo $1=\$$1
|
eval echo $1=\$$1
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "#"
|
|
||||||
echo "# $g_product $SHOREWALL_VERSION detected the following iptables/netfilter capabilities - $(date)"
|
|
||||||
echo "#"
|
|
||||||
report_capability1 NAT_ENABLED
|
report_capability1 NAT_ENABLED
|
||||||
report_capability1 MANGLE_ENABLED
|
report_capability1 MANGLE_ENABLED
|
||||||
report_capability1 MULTIPORT
|
report_capability1 MULTIPORT
|
||||||
@ -2660,6 +2662,13 @@ report_capabilities1() {
|
|||||||
echo KERNELVERSION=$KERNELVERSION
|
echo KERNELVERSION=$KERNELVERSION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
report_capabilities1() {
|
||||||
|
echo "#"
|
||||||
|
echo "# $g_product $SHOREWALL_VERSION detected the following iptables/netfilter capabilities - $(date)"
|
||||||
|
echo "#"
|
||||||
|
report_capabilities_unsorted1 | sort
|
||||||
|
}
|
||||||
|
|
||||||
show_status() {
|
show_status() {
|
||||||
if product_is_started ; then
|
if product_is_started ; then
|
||||||
echo "$g_product is running"
|
echo "$g_product is running"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user