#!/bin/bash
### BEGIN BOOT SCRIPT INFO
#Long-Name: Dwarf
### END BOOT SCRIPT INFO
### BEGIN BOOT SCRIPT INSTALLATION DEFAULTS
#Launch-Mode: gui-only
### END BOOT SCRIPT INSTALLATION DEFAULTS
#
#This script uses a standard run scriptlet (RUN_DWARF), although you usually
#don't need to actually call run_dwarf in it; all you have to do is set
#$DWARF_MACHINE to the machine name and $DWARF_CONFIG to the Dwarf configuration
#name.
#

. bootscriptfunctions.sh

run_dwarf()
{
	if [ ! "$DWARF_MACHINE" ]
	then
		echo "DWARF_MACHINE unset" >&2
		exit 1
	fi

	if [ ! "$DWARF_CONFIG" ]
	then
		echo "DWARF_CONFIG unset" >&2
		exit 1
	fi

	exec java -jar dwarf.jar -$DWARF_MACHINE "$@" "$DWARF_CONFIG"
}

OPTIONAL_RUN=1
call_run_scriptlet dwarf
