Chapter 33. check_service_disabled.linux.sh

#!/bin/sh

if [ -z "$1" ]
then
	echo $0: no argument supplied, aborting
	exit 1
fi

/sbin/chkconfig --list $1 | grep on >/dev/null 2>/dev/null

if [ $? -eq 0 ]
then
	# chkconfig can't be verbose, so we'll use sh -x to make this part visible
	/bin/echo -n "$0: ";  sh -x -c "/sbin/chkconfig $1 off"
fi


exit