<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>4771</bug_id>
          
          <creation_ts>2004-07-12 13:37:48 +0400</creation_ts>
          <short_desc>ошибки в initscript</short_desc>
          <delta_ts>2008-02-15 22:39:11 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>snort</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="tma">tma</reporter>
          <assigned_to name="Serhii Hlodin">hlodin</assigned_to>
          <cc>evseev</cc>
    
    <cc>mike</cc>
    
    <cc>oddity</cc>
    
    <cc>sem</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16924</commentid>
    <comment_count>0</comment_count>
    <who name="tma">tma</who>
    <bug_when>2004-07-12 13:37:48 +0400</bug_when>
    <thetext>при остановке сервиса: service snortd stop - приложение не останавливается,
соответственно не работает так же и status....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18387</commentid>
    <comment_count>1</comment_count>
    <who name="evseev">evseev</who>
    <bug_when>2004-08-27 04:21:04 +0400</bug_when>
    <thetext>I hope this patch should fix described problem.
Update in Sisyphus (snort-2.2.0-alt2) will be available very soon ;-)
--- /etc/rc.d/init.d/snortd.orig	2004-08-25 04:32:43 +0400
+++ /etc/rc.d/init.d/snortd	2004-08-27 04:14:44 +0400
@@ -16,6 +16,13 @@
 # Source function library.
 . /etc/init.d/functions
 
+# Testing tricks.
+if [ &quot;$1&quot; = &quot;--trace-script&quot; ]; then
+    shift
+    echo Enable script tracing...
+    set -x
+fi
+
 # Get config.
 CONFIG=/etc/sysconfig/snort
 SourceIfNotEmpty &quot;$CONFIG&quot; || exit 0
@@ -24,19 +31,39 @@
 
 [ -n &quot;$INTERFACES&quot; ] || exit 0
 
-IFN=`echo $INTERFACES | sed -e &apos;s/, */ /g&apos; | awk &apos;{split($0, iface); {for (i in 
iface) {print $i;}}}&apos;`
+function print_all_ifaces() {
+    local linenum=0
+    netstat -i | egrep -v &apos;^lo&apos; | while read first_word unused_tail; do
+	: $[linenum++]
+	case $linenum in
+	    1 | 2 ) ;;
+	    * ) echo $first_word ;;
+	esac
+    done
+}
+
+IFN=`echo $INTERFACES | sed -e &apos;s/, */ /g&apos;`
+case &quot;$IFN&quot; in
+    &quot;&quot; | any | all | Any | All | ANY | ALL ) IFN=`print_all_ifaces` ;;
+esac
 
 start()
 {
+    local add_params
     for i in $IFN; do
 	PIDFILE=/var/run/snort_$i.pid
 	LOCKFILE=/var/lock/subsys/snort_$i
+	for suffix in $i any all Any All ANY ALL; do
+	    eval add_params=\$ADDPARAMS_$suffix
+	    test -n &quot;$add_params&quot; &amp;&amp; break
+	done
 	start_daemon --pidfile &quot;$PIDFILE&quot; \
 	    --lockfile &quot;$LOCKFILE&quot; \
 	    --expect-user snort -- \
 	    snort -u snort -g snort \
 	    -t /var/log/snort \
-	    $(eval echo $(echo \$`echo ADDPARAMS_$i`))
+	    -i $i \
+	    $add_params
 	RETVAL=$?
 	if [ $RETVAL != 0 ]; then
 	    return $RETVAL
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63621</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-02-15 22:38:43 +0300</bug_when>
    <thetext>re</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63622</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-02-15 22:39:11 +0300</bug_when>
    <thetext>apparently fixed :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>