#! /bin/sh
### BEGIN INIT INFO
# Provides:          puppet-razor
# Required-Start:    $network $named $remote_fs $syslog
# Required-Stop:     $network $named $remote_fs $syslog
# Should-Start:      
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: flexible discovery and provisioning solution for bare metal and virtual machines
# Description: Razor is a full-stack solution for managing the full bare metal and
#     virtual machine lifecycle, designed to scale from small deployments
#     to clusters of hundreds of thousands of physical machines.
#     
#     It melds together dynamic discovery of machine properties, simple models
#     of current and desired state, and a flexible policy engine to easily
#     express configuration for networks at any scale.
#     
#     Razor also focuses beyond the simple "OS installation" scenario, and is
#     designed to enable complex models such as "upgrade firmware, then install",
#     or "decommission, securely wipe disks, rediscover, and reprovision".
#     
#     Unlike many tools, Razor focuses on doing one job extremely well, and
#     handling on responsibility.  Once the basic configuration is done, Razor
#     will hand the system to a configuration management broker like Puppet
#     to provide ongoing change management - or it can simple stop, hands off,
#     for manual management.
#     
#     It also focuses heavily on providing extension points and hooks to allow
#     you to model your needs.  It is deliberately agnostic to platform, OS,
#     and configuration broker choices.
### END INIT INFO

PATH=/opt/razor/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/razor/bin/razor_daemon.rb
NAME=razor
DESC="Puppet Razor provisioning server"
PIDFILE="/opt/razor/${NAME}.pid"

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

# We can just delegate all our operations to the Ruby wrapper script.
exec $DAEMON "$@"
