# $NetBSD: rc.subr,v 1.1 1997/08/29 02:24:08 cjs Exp $ # functions used by various rc scripts # Test $1 variable, and warn if not set to YES or NO. checkyesno() { eval value=\$${1}; if [ "$value" = YES ]; then return 0; else if [ "$value" != NO ]; then logger -s "WARNING: \$${1} is not set properly." fi return 1; fi } # Set $1_flags to $2 if it's currently "DEFAULT". checkflags() { eval value=\$${1}_flags; if [ "$value" = DEFAULT ]; then eval ${1}_flags="\$2"; fi }