rc.subr (223227) | rc.subr (223292) |
---|---|
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 223227 2011-06-18 11:05:30Z jilles $ | 2# $FreeBSD: head/etc/rc.subr 223292 2011-06-19 11:42:48Z jilles $ |
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 --- 1728 unchanged lines hidden (view full) --- 1739# false. The result will be cached in $_rc_cache_kern_features_ 1740# namespace. "0" means the kern.features.X exists. 1741 1742check_kern_features() 1743{ 1744 local _v 1745 1746 [ -n "$1" ] || return 1; | 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 --- 1728 unchanged lines hidden (view full) --- 1739# false. The result will be cached in $_rc_cache_kern_features_ 1740# namespace. "0" means the kern.features.X exists. 1741 1742check_kern_features() 1743{ 1744 local _v 1745 1746 [ -n "$1" ] || return 1; |
1747 _v=`eval echo "\\$_rc_cache_kern_features_$1"` | 1747 eval _v=\$_rc_cache_kern_features_$1 |
1748 [ -n "$_v" ] && return "$_v"; 1749 1750 if ${SYSCTL_N} kern.features.$1 > /dev/null 2>&1; then 1751 eval _rc_cache_kern_features_$1=0 1752 return 0 1753 else 1754 eval _rc_cache_kern_features_$1=1 1755 return 1 --- 23 unchanged lines hidden --- | 1748 [ -n "$_v" ] && return "$_v"; 1749 1750 if ${SYSCTL_N} kern.features.$1 > /dev/null 2>&1; then 1751 eval _rc_cache_kern_features_$1=0 1752 return 0 1753 else 1754 eval _rc_cache_kern_features_$1=1 1755 return 1 --- 23 unchanged lines hidden --- |