Ignore:
Timestamp:
Oct 5, 2007, 8:33:24 PM (17 years ago)
Author:
rainer
Message:

New option for portcheck to ignore selected ports. Released as 2.3.8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/testrun_1e.sh

    r67 r128  
    2323export BUILDOPTS
    2424
    25 MAXTEST=2; export MAXTEST
     25MAXTEST=3; export MAXTEST
     26
     27PORTPOLICY_3="
     28[ReadOnly]
     29file=${BASE}
     30[PortCheck]
     31PortCheckActive = yes
     32PortCheckUDP = no
     33"
     34
     35chk_portdata_3 () {
     36    one_sec_sleep
     37
     38    egrep 'CRIT.*POLICY \[ServiceNew\]' $LOGFILE >/dev/null 2>&1
     39    if [ $? -eq 0 ]; then
     40       
     41        [ -z "$verbose" ] || log_msg_fail "Open ports";
     42        return 1
     43    fi
     44}
     45
     46refine_portpolicy_3 ()
     47{
     48    cat "$LOGFILE" | grep ServiceNew | sed 's/.*port //' | awk '{ print $1 }' | \
     49    while read line; do
     50        echo "PortCheckIgnore=$line" >>"${RCFILE}"
     51    done
     52    echo "PortCheckIgnore=2026" >>"${RCFILE}"
     53    echo "PortCheckIgnore=2027" >>"${RCFILE}"
     54    echo "PortCheckIgnore=2028" >>"${RCFILE}"
     55    echo "PortCheckIgnore=2029" >>"${RCFILE}"
     56}
     57
    2658
    2759PORTPOLICY_2="
Note: See TracChangeset for help on using the changeset viewer.