classes.sh 412 Bytes
#!/bin/dash

##
# This creates function that will gather some system informations
# and propagate them as environment variables.
#

. ./utils.sh
include_once system_information.sh
include_once interface_information.sh

has_class() {
	if [ 1 -ne $# ]
	then
		logger -p syslog.err 'has_class: no class given'
		exit 1
	fi

	local CHECK=" ${CLASSES}"
	test "${CHECK}" != "${CHECK% ${1} *}"
}

# vim: set ts=4 sw=4: