Date: Thu, 22 Jun 2006 21:04:35 GMT From: "Vasiliy P. Melnik" <basil@gu.net> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/99322: rc.d script netams truble (net-mgmt/netams) Message-ID: <200606222104.k5ML4Zf0057631@www.freebsd.org> Resent-Message-ID: <200606222110.k5MLAGvn095383@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 99322 >Category: i386 >Synopsis: rc.d script netams truble (net-mgmt/netams) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 22 21:10:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Vasiliy P. Melnik >Release: 6.1 >Organization: GU ISP >Environment: FreeBSD nychka.gu.net 6.1-RELEASE-p1 FreeBSD 6.1-RELEASE-p1 #0: Tue Jun 6 14:09:48 EEST 2006 root@nychka.gu.net:/usr/obj/usr/src/sys/NYCHKA i386 >Description: if starting netams from rc.d script some times, run-daemon scrip does not check if daemoin is started and it start daemon again [12:04] ffu:~ ]#/usr/local/etc/rc.d/netams start Starting netams. [12:04] ffu:~ ]#/usr/local/etc/rc.d/netams start Starting netams. [12:04] ffu:~ ]#/usr/local/etc/rc.d/netams start Starting netams. [12:04] ffu:~ ]#lsof -i | grep netams netams 21222 root 4u IPv4 0xc17e11d0 0t0 TCP localhost:20001 (LISTEN) netams 21222 root 4u IPv4 0xc17e11d0 0t0 TCP localhost:20001 (LISTEN) netams 21222 root 4u IPv4 0xc17e11d0 0t0 TCP localhost:20001 (LISTEN) netams 21222 root 4u IPv4 0xc17e11d0 0t0 TCP localhost:20001 (LISTEN) netams 21222 root 4u IPv4 0xc17e11d0 0t0 TCP localhost:20001 (LISTEN) netams 21231 root 4u IPv4 0xc1db3ae0 0t0 TCP *:* (CLOSED) netams 21231 root 4u IPv4 0xc1db3ae0 0t0 TCP *:* (CLOSED) netams 21231 root 4u IPv4 0xc1db3ae0 0t0 TCP *:* (CLOSED) netams 21231 root 4u IPv4 0xc1db3ae0 0t0 TCP *:* (CLOSED) netams 21240 root 4u IPv4 0xc17a1570 0t0 TCP *:* (CLOSED) netams 21240 root 4u IPv4 0xc17a1570 0t0 TCP *:* (CLOSED) netams 21240 root 4u IPv4 0xc17a1570 0t0 TCP *:* (CLOSED) netams 21240 root 4u IPv4 0xc17a1570 0t0 TCP *:* (CLOSED) >How-To-Repeat: if starting netams from rc.d script some times >Fix: [0:00] nychka:/usr/ports ]#cat /usr/local/etc/rc.d/netams #!/bin/sh # $FreeBSD: ports/net-mgmt/netams/files/netams.sh.in,v 1.1 2006/06/14 12:08:24 pav Exp $ foxed rc.d script [0:01] nychka:/usr/ports ]#cat /usr/local/etc/rc.d/netams --------------------------------------------------------------------- # PROVIDE: netams # REQUIRE: NETWORKING # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable netams # # netams_enable (bool): Set to "NO" by default. # Set it to "YES" to enable netams. # netams_config (str): Custom configuration file to be passed # to netams. # # DO NOT CHANGE THESE DEFAULT VALUES HERE # . /etc/rc.subr name="netams" rcvar=`set_rcvar` load_rc_config $name :${netams_enable="NO"} :${netams_config="/usr/local/etc/netams.cfg"} pidfile="/var/run/netams.pid" command="/usr/local/libexec/netams" command_args="-lf ${netams_config} > /dev/null &" run_rc_command "$1" ---------------------------------------------------------------- [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams start netams already running? (pid=5530). [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams start netams already running? (pid=5530). [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams start netams already running? (pid=5530). [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams start netams already running? (pid=5530). [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams stop Stopping netams. Waiting for PIDS: 5530. [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams stop netams not running? (check /var/run/netams.pid). [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams start Starting netams. [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams start netams already running? (pid=70294). [0:03] nychka:~ ]#/usr/local/etc/rc.d/netams restart Stopping netams. Waiting for PIDS: 70294. Starting netams. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606222104.k5ML4Zf0057631>