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) 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. How-To-Repeat: if starting netams from rc.d script some times
State Changed From-To: open->feedback Recalsiffy and take. Ask for maintainer feedback.
Responsible Changed From-To: freebsd-i386->itetcu Recalsiffy and take. Ask for maintainer feedback.
Pro
State Changed From-To: feedback->closed Commiter with fixes; next time please submit diffs.