Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2015 17:50:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 197827] net-mgmt/xymon-client rc script does not handle "faststart" [patch]
Message-ID:  <bug-197827-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197827

            Bug ID: 197827
           Summary: net-mgmt/xymon-client rc script does not handle
                    "faststart" [patch]
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: feld@FreeBSD.org
          Reporter: john@jnielsen.net
          Assignee: feld@FreeBSD.org
             Flags: maintainer-feedback?(feld@FreeBSD.org)

I'm not sure if it was an update to the port or -STABLE, but xymon-client no
longer starts at boot on my system:

% uname -a
FreeBSD stealth.jnielsen.net 10.1-STABLE FreeBSD 10.1-STABLE #1 r278970M: Wed
Feb 18 15:33:54 MST 2015    
john@stealth.jnielsen.net:/ssdtmp/obj/usr/src/sys/STEALTH  amd64

Feb 19 10:14:44 stealth kernel: Starting xymon_client.
Feb 19 10:14:45 stealth kernel: Usage: /usr/local/www/xymon/client/runclient.sh
start|stop|restart|status

It also does not handle other prefixed commands (fast, force, one, quiet),
since it includes "${1}" unsanitized in ${command_args}. I propose the
following, to allow run_rc_command to do all of its magic and still pass the
correct argument to runclient.sh. The patch works for me, but I am not the most
experienced rc programmer.

# diff -u xymon-client.orig xymon-client
--- xymon-client.orig    2015-02-12 13:31:00.784342859 -0700
+++ xymon-client    2015-02-19 10:46:12.134221439 -0700
@@ -16,10 +16,10 @@
 : ${xymon_client_enable:=NO}
 : ${xymon_client_user:=xymon}

-command=/usr/local/www/xymon/client/runclient.sh
-command_args="${xymon_client_flags} ${1}"
 procname=/usr/local/www/xymon/client/bin/xymonlaunch
 pidfile="/usr/local/www/xymon/client/logs/clientlaunch.`hostname`.pid"
 start_precmd="chown -R ${xymon_client_user} /usr/local/www/xymon/client/logs"
+start_cmd="/usr/local/www/xymon/client/runclient.sh ${xymon_client_flags}
start"
+stop_cmd="/usr/local/www/xymon/client/runclient.sh ${xymon_client_flags} stop"

 run_rc_command "$1"

--- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Auto-assigned to maintainer feld@FreeBSD.org

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197827-13>