[Bug 191361] New: comms/smstools3 new rc.d script

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jun 25 10:26:37 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191361

            Bug ID: 191361
           Summary: comms/smstools3 new rc.d script
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: timp87 at gmail.com

Created attachment 144115
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144115&action=edit
patch for /usr/ports/comms/smstools3/files/smsd.in

Hi! Exiting smsd rc.d script doesn't work properly because it has mitakes.
Now it looks such:
.....
. /etc/rc.subr

name="smsd"
rcvar=smsd_enable

load_rc_config ${name}
: ${smsd_enable="NO"}
: ${smsd_pidfile="/var/run/smsd/smsd.pid"}
: ${smsd_infofile="/var/run/smsd/smsd.working"}
: ${smsd_logfile="/var/log/smsd/smsd.log"}
: ${smsd_config="/usr/local/etc/smsd.conf"}
: ${smsd_user="uucp"}
: ${smsd_group="dialer"}

pidfile=${smsd_pidfile}
command="/usr/local/bin/smsd"
command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile}
-l${smsd_logfile} -u${smsd_user} -g${smsd_group}"

run_rc_command "$1"


It's definetely wrong to use here ${name}_user and ${name}_group to pass it to
smsd as arguments.
See /etc/rc.subr, ${name}_user and ${name}_group variables lead to call su to
change user.
But smsd has to change user itself using its arguments.

I attached a little bit reworked rc.d script where I deleted smsd_user and
smsd_group vars, I deleted smsd_logfile because it's stupid and it may (and has
to) be set in config file. Also I added smsd_flags.
It's a root of problem from another PR
(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164197).

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


More information about the freebsd-ports-bugs mailing list