rc script for nut_upslog not using proper Parameter Expansion. --- nut_upslog.old 2018-11-09 00:25:56.647672000 -0800 +++ nut_upslog 2018-11-09 00:26:18.729312000 -0800 @@ -31,6 +31,6 @@ required_dirs="/var/db/nut" command="${nut_upslog_prefix}/bin/upslog" pidfile="/var/db/nut/upslog.pid" -nut_upslog_flags=${nut_upslog_flags-"-s ${nut_upslog_ups} -l ${nut_upslog_logfile} -i ${nut_upslog_interval}"} +nut_upslog_flags=${nut_upslog_flags:-"-s ${nut_upslog_ups} -l ${nut_upslog_logfile} -i ${nut_upslog_interval}"} run_rc_command "$1"
Thank you elij Could you please provide the change/diff included in comment 0 as an attachment please
Sure. I found another similar missing colon in nut_upsmon rc script too. I'll include them both.
Created attachment 199091 [details] sysutils-nut.diff added diff/patch file (p1 required to apply I guess?)
While here, shouldn't we use "command_args" here instead of "${name}_flags"?
(In reply to elij from comment #3) The patch fails: a) wrong filename and b) it generally fails to apply.
A commit references this bug: Author: cy Date: Fri Nov 9 13:47:52 UTC 2018 New revision: 484513 URL: https://svnweb.freebsd.org/changeset/ports/484513 Log: Fix incorrect script default parameter expansion. PR: 233083 Changes: head/sysutils/nut/Makefile head/sysutils/nut/files/nut_upslog.in head/sysutils/nut/files/nut_upsmon.in