6b18196f4c
uppercase/lowercase variations of 'yes' and 'no'. fixes [misc/4887] sent in by "John F. Woods" <jfw@jfwhome.funhouse.com>
20 lines
342 B
Plaintext
20 lines
342 B
Plaintext
# $NetBSD: rc.subr,v 1.3 1998/01/26 04:36:26 lukem Exp $
|
|
# functions used by various rc scripts
|
|
|
|
# Test $1 variable, and warn if not set to YES or NO.
|
|
checkyesno() {
|
|
eval value=\$${1};
|
|
case $value in
|
|
[Yy][Ee][Ss])
|
|
return 0;
|
|
;;
|
|
[Nn][Oo])
|
|
return 1;
|
|
;;
|
|
*)
|
|
logger -s "WARNING: \$${1} is not set properly."
|
|
return 1;
|
|
;;
|
|
esac
|
|
}
|