Deleted Added
full compact
rc.subr (220974) rc.subr (222996)
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 220974 2011-04-23 17:37:14Z dougb $
2# $FreeBSD: head/etc/rc.subr 222996 2011-06-11 21:40:37Z hrs $
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

--- 1718 unchanged lines hidden (view full) ---

1729 ;;
1730 esac
1731
1732 return 0
1733}
1734
1735fi
1736
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

--- 1718 unchanged lines hidden (view full) ---

1729 ;;
1730 esac
1731
1732 return 0
1733}
1734
1735fi
1736
1737# check_kern_features mib
1738# Return existence of kern.features.* sysctl MIB as true or
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"`
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
1756 fi
1757}
1758
1737# _echoonce var msg mode
1738# mode=0: Echo $msg if ${$var} is empty.
1739# After doing echo, a string is set to ${$var}.
1740#
1741# mode=1: Echo $msg if ${$var} is a string with non-zero length.
1742#
1743_echoonce()
1744{

--- 12 unchanged lines hidden ---
1759# _echoonce var msg mode
1760# mode=0: Echo $msg if ${$var} is empty.
1761# After doing echo, a string is set to ${$var}.
1762#
1763# mode=1: Echo $msg if ${$var} is a string with non-zero length.
1764#
1765_echoonce()
1766{

--- 12 unchanged lines hidden ---