[Bug 230621] rc.subr wrong override for $command

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Aug 14 18:04:06 UTC 2018


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

            Bug ID: 230621
           Summary: rc.subr wrong override for $command
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: bugs at FreeBSD.org
          Reporter: eugen at freebsd.org
                CC: dougb at FreeBSD.org, portmgr at FreeBSD.org

/etc/rc.subr has run_rc_command() function used with base system and ports. The
function contains this code:

eval _override_command=\$${name}_program
command=${_override_command:-$command}

This code supposes that ${name} contents must have correct syntax for shell
variable. This is wrong for our Ports Collection having plenty of ports with
dash (-) in the ${name}. For such a port, ${name}_program expands to something
like: part1-part2_program with non-existing (empty) $part1 variable.

So, _override_command ends up with always-non-empty wrong value
"-part2_program". Therefore, the value of ${command} set by port's startup
script is always ignored due to code cited above and replaced with bad
"-part2_program" string that break it all.

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


More information about the freebsd-bugs mailing list