pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/rc.subr Make this work on OpenSolaris



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d2fb06c45638
branches:  trunk
changeset: 551897:d2fb06c45638
user:      adrianp <adrianp%pkgsrc.org@localhost>
date:      Sun Dec 21 00:03:32 2008 +0000

description:
Make this work on OpenSolaris

diffstat:

 pkgtools/rc.subr/Makefile      |   4 ++--
 pkgtools/rc.subr/files/rc.subr |  18 +++++++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diffs (54 lines):

diff -r 5cfcbd2b9e1a -r d2fb06c45638 pkgtools/rc.subr/Makefile
--- a/pkgtools/rc.subr/Makefile Sun Dec 21 00:01:53 2008 +0000
+++ b/pkgtools/rc.subr/Makefile Sun Dec 21 00:03:32 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2008/06/04 13:34:46 sketch Exp $
+# $NetBSD: Makefile,v 1.18 2008/12/21 00:03:32 adrianp Exp $
 #
 
-DISTNAME=              rc.subr-20080423
+DISTNAME=              rc.subr-20081208
 CATEGORIES=            pkgtools
 MASTER_SITES=          # empty
 DISTFILES=             # empty
diff -r 5cfcbd2b9e1a -r d2fb06c45638 pkgtools/rc.subr/files/rc.subr
--- a/pkgtools/rc.subr/files/rc.subr    Sun Dec 21 00:01:53 2008 +0000
+++ b/pkgtools/rc.subr/files/rc.subr    Sun Dec 21 00:03:32 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.8 2008/04/23 18:04:03 joerg Exp $
+# $NetBSD: rc.subr,v 1.9 2008/12/21 00:03:32 adrianp Exp $
 #
 # Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -65,17 +65,29 @@
 _RCARG_su="-m"
 
 _osname=$(uname -s)
+_osrelease=$(uname -r)
 case $_osname in
        SunOS)
                _RCCMD_chown="/bin/chown"
 #              _RCCMD_ci="/usr/bin/ci"                 # not in Solaris 9
 #              _RCCMD_co="/usr/bin/co"                 # not in Solaris 9
-               _RCCMD_echo="/usr/ucb/echo"
 #              _RCCMD_systrace="/bin/systrace"         # not in Solaris 9
-               _RCCMD_whoami="/usr/ucb/whoami"
                _RCARG_psformat="-o pid,comm"
                _RCARG_ps="-ef"
                _RCARG_su=""
+               if [ "$_osrelease" = "5.11" ]; then
+                       bsd_echo () {
+                               if [ "$1" = "-n" ]; then
+                                       shift; echo "$@\c"
+                               else
+                                       echo "$@"
+                               fi
+                       }
+                       _RCCMD_echo="bsd_echo"
+               else
+                       _RCCMD_echo="/usr/ucb/echo"     # not in Solaris 11
+                       _RCCMD_whoami="/usr/ucb/whoami" # not in Solaris 11
+               fi
                ;;
        Interix)
                bsd_echo () {



Home | Main Index | Thread Index | Old Index