Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2018 18:04:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 230621] rc.subr wrong override for $command
Message-ID:  <bug-230621-227@https.bugs.freebsd.org/bugzilla/>

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

            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@FreeBSD.org
          Reporter: eugen@freebsd.org
                CC: dougb@FreeBSD.org, portmgr@FreeBSD.org

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

eval _override_command=3D\$${name}_program
command=3D${_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 someth=
ing
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.

--=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-230621-227>