2 # Filename: grml-iptstate
3 # Purpose: wrapper around iptstate (top-like display of IP Tables state table entries)
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 ################################################################################
9 # shellcheck disable=SC1091
10 . /etc/grml/script-functions
11 # shellcheck disable=SC1091
12 . /etc/grml/lsb-functions
13 check4progs iptstate || exit 1
15 if grep -q '_conntrack' /proc/modules ; then
18 einfo "iptstate is a top-like display of IP Tables state table entries."
20 ewarn "Module ip_conntrack is not present. Can not start iptstate therefore."
22 einfon "Do you want to load it and invoke iptstate afterwards? [YES|no] "
24 a=$(echo "$a" | tr '[:upper:]' '[:lower:]')
25 if [ "$a" = "yes" ] || [ "$a" = "y" ] || [ "$a" = "" ] ; then
26 modprobe ip_conntrack ; RC=$?
28 [ "$RC" = 0 ] && exec iptstate
30 echo "Aborting as requested."
35 ## END OF FILE #################################################################