pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/49724: pkgtools/rc.subr needs tweak to support Darwin's echo



>Number:         49724
>Category:       pkg
>Synopsis:       pkgtools/rc.subr needs tweak to support Darwin's echo
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 05 23:05:00 +0000 2015
>Originator:     Jason White
>Release:        Darwin 14.1.0
>Organization:
>Environment:
System: Darwin starbug.its.iastate.edu 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
>Description:
The built-in echo in the stock darwin shell doesn not support the '-n' flag to echo. This causes certain pkgsrc commands to fail or contain visual artifacts.

# /etc/rc.d/xymonclient start
Starting xymonclient.
# /etc/rc.d/xymonclient status
xymonclient is running as pid -n 1275.
# /etc/rc.d/xymonclient stop
Stopping xymonclient.
kill: illegal process id: -n

>How-To-Repeat:
Install a package under Darwin that's controlled with an /etc/rc.d/ script and try it with 'status' and 'stop' arguments.

>Fix:
Force rc.subr to use /bin/echo binary.

--- pkgtools/rc.subr/files/rc.subr.orig 2015-03-05 15:37:52.000000000 -0600
+++ pkgtools/rc.subr/files/rc.subr      2015-03-05 15:39:39.000000000 -0600
@@ -67,6 +67,9 @@
 _osname=$(uname -s)
 _osrelease=$(uname -r)
 case $_osname in
+       Darwin)
+               _RCCMD_echo="/bin/echo"
+               ;;
        SunOS)
                _RCCMD_chown="/bin/chown"
 #              _RCCMD_ci="/usr/bin/ci"                 # not in Solaris 9



Home | Main Index | Thread Index | Old Index