Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Snort-Users
[Top] [All Lists]

Re: [Snort-users] snort init.d script wont start snort in suse

Subject: Re: [Snort-users] snort init.d script wont start snort in suse
Date: Sat, 30 Jul 2005 20:53:12 +0300
You are absolutely correct, here it is:


#! /bin/sh
# Copyright (c) 1995-2002 SuSE, Germany.
#
# Author: Matthias Eckermann, SuSE Linux AG
#
### BEGIN INIT INFO
# Provides:       snort
# Required-Start: $network
# Required-Stop:
# Default-Start:  2 3 5
# Default-Stop:
# Description:    snort packet-sniffer/logger
### END INIT INFO

if [ -s /etc/rc.status ] ; then
        . /etc/rc.status
fi
if [ -s /etc/sysconfig/snort ] ; then
        . /etc/sysconfig/snort
elif [ ".`grep SNORT /etc/rc.config`" != "." ] ; then
        . /etc/rc.config
fi

# The echo return value for success (defined in /etc/rc.config).
return=$rc_done
case "$1" in
    start)
        echo -n "Starting snort"
        startproc /usr/sbin/snort $SNORT_OPTS || return=$rc_failed
        echo -e "$return"
        ;;
    stop)
        echo -n "Shutting down snort"
        killproc -TERM /usr/sbin/snort || return=$rc_failed
        echo -e "$return"
        ;;
    status)
        checkproc /usr/sbin/snort
        rc_status -v
        ;;
    restart)
        $0 stop  &&  $0 start  ||  return=$rc_failed
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac
rc_exit


btw, when i run snort just from the command line it works really fine!
So it should be in this script i guess...

Thanx

Cor Koelewijn

pureone wrote:
Cor Koelewijn wrote:

Can somebody tell me wht is going wrong?
I tested snort from the command line and it worked but when i start it from init.d it gives me:

    portal:/etc/init.d # snort start
    Log directory = /var/log/snort

    Initializing Network Interface eth0
    ERROR: OpenPcap() FSM compilation failed:
            parse error
    PCAP command: start
    Fatal Error, Quitting..
    portal:/etc/init.d #


what am i doing wrong?

Cor Koelewijn

it would help if we could see the script as well :)






------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Snort-users mailing list Snort-users@lists.sourceforge.net Go to this URL to change user options or unsubscribe: https://lists.sourceforge.net/lists/listinfo/snort-users Snort-users list archive: http://www.geocrawler.com/redir-sf.php3?list=snort-users
<Prev in Thread] Current Thread [Next in Thread>