rc.subr revision 1.1
1# $NetBSD: rc.subr,v 1.1 1997/08/29 02:24:08 cjs Exp $ 2# functions used by various rc scripts 3 4# Test $1 variable, and warn if not set to YES or NO. 5checkyesno() { 6 eval value=\$${1}; 7 if [ "$value" = YES ]; then 8 return 0; 9 else 10 if [ "$value" != NO ]; then 11 logger -s "WARNING: \$${1} is not set properly." 12 fi 13 return 1; 14 fi 15} 16 17# Set $1_flags to $2 if it's currently "DEFAULT". 18checkflags() { 19 eval value=\$${1}_flags; 20 if [ "$value" = DEFAULT ]; then 21 eval ${1}_flags="\$2"; 22 fi 23} 24