summaryrefslogtreecommitdiff
path: root/pkgtools/rc.subr
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2008-12-21 00:03:32 +0000
committeradrianp <adrianp@pkgsrc.org>2008-12-21 00:03:32 +0000
commit9e164864f6533c3c801eb6515283c8af957e3664 (patch)
treef68c9349e814abaa656470363bfe2b69944b16a4 /pkgtools/rc.subr
parentd8a96d48d129c2f72131f43e75982abe8127aad6 (diff)
downloadpkgsrc-9e164864f6533c3c801eb6515283c8af957e3664.tar.gz
Make this work on OpenSolaris
Diffstat (limited to 'pkgtools/rc.subr')
-rw-r--r--pkgtools/rc.subr/Makefile4
-rw-r--r--pkgtools/rc.subr/files/rc.subr18
2 files changed, 17 insertions, 5 deletions
diff --git a/pkgtools/rc.subr/Makefile b/pkgtools/rc.subr/Makefile
index 4ffee4c4565..84ece48b891 100644
--- a/pkgtools/rc.subr/Makefile
+++ b/pkgtools/rc.subr/Makefile
@@ -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 --git a/pkgtools/rc.subr/files/rc.subr b/pkgtools/rc.subr/files/rc.subr
index 8a8b9902135..a017d81e208 100644
--- a/pkgtools/rc.subr/files/rc.subr
+++ b/pkgtools/rc.subr/files/rc.subr
@@ -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_ps="-ax"
_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 () {