#!/bin/sh
# $Copyright$
# Copyright (C) Fujitsu Technology Solutions 2014
# All rights reserved
#############################################################################
#
# SetRunLevel:	Utility for eecd/svas service to determine if the system is going down

case $1 in
		reboot)
			echo 6 >/etc/srvmagt/RunLevel ;;
		shutdown | poweroff)
			echo 0 >/etc/srvmagt/RunLevel ;;
		runlevel*)
			rl=${1#runlevel*}
			echo $rl >/etc/srvmagt/RunLevel ;;
esac
