X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-iptstate;h=b9e9a2fc904e5cdaa76bba34d45a4f408372d4b2;hb=2706049698b8bc7478aa252f5e3a4f394bad4e5e;hp=df254b154fec85b50cd03f499adeb8a22272b036;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts.git diff --git a/usr_sbin/grml-iptstate b/usr_sbin/grml-iptstate index df254b1..b9e9a2f 100755 --- a/usr_sbin/grml-iptstate +++ b/usr_sbin/grml-iptstate @@ -4,24 +4,29 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Okt 12 17:20:59 CEST 2006 [mika] ################################################################################ . /etc/grml/script-functions +. /etc/grml/lsb-functions check4progs iptstate || exit 1 -if grep -q ip_conntrack /proc/modules ; then +if grep -q '_conntrack' /proc/modules ; then iptstate else - echo "Module ip_conntrack is not present. Can not start iptstate therefore." - echo -n "Do you want to load it and invoke iptstate afterwards? [YES|no] " - read a - if [ "$a" = YES -o "$a" = yes -o "$a" = '' -o "$a" = y -o "$a" = Y ] ; then - modprobe ip_conntrack && exec iptstate - else - echo "Aborting as requested." - exit 1 - fi + einfo "iptstate is a top-like display of IP Tables state table entries." + echo + ewarn "Module ip_conntrack is not present. Can not start iptstate therefore." + eindent + einfon "Do you want to load it and invoke iptstate afterwards? [YES|no] " + read a + if [ "$a" = YES -o "$a" = yes -o "$a" = '' -o "$a" = y -o "$a" = Y ] ; then + modprobe ip_conntrack ; RC=$? + eend $RC + [ "$RC" = 0 ] && exec iptstate + else + echo "Aborting as requested." + exit 1 + fi fi ## END OF FILE #################################################################