From: "Овечкин Влад" <test@rrnn.ru> To: "community@altlinux.ru" <community@altlinux.ru> Subject: [Comm] Проблема с самописным стартовым скриптом для tcpdump. Date: Tue, 17 May 2005 12:01:08 +0400 Message-ID: <4289A4C4.2060309@rrnn.ru> (raw) Приветствую:) Хочу собирать статистику по одному интефейсу с помощью tcpdump. Попытался создать скрипт для автоматической загрузки. Но он работает как-то на половину - в консоли показывает следующее: # /etc/init.d/stat start Starting tcpdump service: И всё. Никакких [DONE]. Вернуть консоль можно только по CTRL-C. Хотя статистику исправно пишет куда нужно... Вот, как я написал стартовый скрипт - подскажите, где подправить? В этом вопросе я очень слаб, так что не пинайте сильно. #!/bin/sh WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions # Source networking configuration. SourceIfNotEmpty /etc/sysconfig/network PIDFILE=/var/run/stat.pid LOCKFILE=/var/lock/subsys/stat RUNOPTIONS="-p -i eth0 -w /home/test1" # Source config. ###SourceIfNotEmpty /etc/sysconfig/sshd RETVAL=0 start() { is_yes "$NETWORKING" || return 0 start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- /usr/sbin/tcpdump "$RUNOPTIO # start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- /usr/sbin/tcpdump -i eth0 - RETVAL=$? return $RETVAL } stop() { stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root /usr/sbin/tcpdump RETVAL=$? return $RETVAL } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; status) status --pidfile "$PIDFILE" --expect-user root tcpdump RETVAL=$? ;; *) msg_usage "${0##*/} {start|stop|restart|status}" RETVAL=1 esac exit $RETVAL С уважением, Овечкин Влад.
next reply other threads:[~2005-05-17 8:01 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-05-17 8:01 Овечкин Влад [this message] 2005-05-17 8:04 ` Michael Isachenkov 2005-05-17 15:08 ` Yura Kalinichenko 2005-05-17 15:39 ` Michael Isachenkov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4289A4C4.2060309@rrnn.ru \ --to=test@rrnn.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git