#!/bin/sh
#
# livecd-user	Create LiveCD user
#
# chkconfig: 345 06 94
# description:	Create LiveCD user

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

LOCKFILE=/run/lock/subsys/livecd-user
RETVAL=0

start()
{
	/usr/libexec/livecd-user
	RETVAL=$?
	[ $RETVAL = 0 ] && echo_success || echo_failure
	return $RETVAL
}

# See how we were called.
case "$1" in
	start|restart|reload)
		start
		;;
	stop)
		;;
	condstop)
		;;
	condrestart|condreload)
		if [ -e "$LOCKFILE" ]; then
			start
		fi
		;;
	status)
		;;
	*)
		msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
		RETVAL=1
esac

exit $RETVAL
