Date: Sat, 09 Mar 2019 11:13:43 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 208445] /usr/sbin/service: WARNING: $xyz is not set properly - see rc.conf(5). Message-ID: <bug-208445-227-uy1sGXlTm4@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-208445-227@https.bugs.freebsd.org/bugzilla/> References: <bug-208445-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208445 misc-freebsd-bugzilla@talk2dom.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |misc-freebsd-bugzilla@talk2 | |dom.com --- Comment #3 from misc-freebsd-bugzilla@talk2dom.com --- Still present in FreeBSD12.0-RELEASE "$ is not set properly" ... is caused by this in /etc/rc.d/addswap: rcvar=3D and this code in service(8): eval `grep ^rcvar $file` if [ -n "$rcvar" ]; then load_rc_config_var ${name} ${rcvar} fi checkyesno $rcvar 2>/dev/null && echo $file So although service(8) checks whether $rcvar has non-zero length (-n), it s= till goes on to use it with checkyesno (from /etc/rc.subr) which emits the warni= ng. Other /etc/rc.d scripts with empty rcvar, like dhclient, have "nostart" in their keywords so are not considered by service(8) thanks to it calling rcorder(8) with "-s nostart" That's the 'why' but I don't know enough to say whether the fix should be: 1. move checkyesno inside the if-block for service(8) 2. change checkyesno to remove warning if arg (rcvar) is unset/empty 3. add "nostart" keyword /etc/rc.d/addswap --=20 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-208445-227-uy1sGXlTm4>