rc.subr (201038) | rc.subr (202988) |
---|---|
1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ | 1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ |
2# $FreeBSD: head/etc/rc.subr 201038 2009-12-27 06:27:09Z dougb $ | 2# $FreeBSD: head/etc/rc.subr 202988 2010-01-25 20:59:04Z emaste $ |
3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 36 unchanged lines hidden (view full) --- 47# 48 49if [ -z "${_rc_subr_loaded}" ]; then 50 51_rc_subr_loaded="YES" 52 53SYSCTL="/sbin/sysctl" 54SYSCTL_N="${SYSCTL} -n" | 3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 36 unchanged lines hidden (view full) --- 47# 48 49if [ -z "${_rc_subr_loaded}" ]; then 50 51_rc_subr_loaded="YES" 52 53SYSCTL="/sbin/sysctl" 54SYSCTL_N="${SYSCTL} -n" |
55CMD_OSTYPE="${SYSCTL_N} kern.ostype" 56OSTYPE=`${CMD_OSTYPE}` | 55SYSCTL_W="${SYSCTL}" |
57ID="/usr/bin/id" 58IDCMD="if [ -x $ID ]; then $ID -un; fi" 59PS="/bin/ps -ww" 60JID=`$PS -p $$ -o jid=` 61 | 56ID="/usr/bin/id" 57IDCMD="if [ -x $ID ]; then $ID -un; fi" 58PS="/bin/ps -ww" 59JID=`$PS -p $$ -o jid=` 60 |
62case ${OSTYPE} in 63FreeBSD) 64 SYSCTL_W="${SYSCTL}" 65 ;; 66NetBSD) 67 SYSCTL_W="${SYSCTL} -w" 68 ;; 69esac 70 | |
71# 72# functions 73# --------- 74 75# set_rcvar [var] [defval] [desc] 76# 77# Echo or define a rc.conf(5) variable name. Global variable 78# $rcvars is used. --- 1649 unchanged lines hidden --- | 61# 62# functions 63# --------- 64 65# set_rcvar [var] [defval] [desc] 66# 67# Echo or define a rc.conf(5) variable name. Global variable 68# $rcvars is used. --- 1649 unchanged lines hidden --- |