#!/bin/bash
#
#	MultiBeast script for setting default boot volume
#
#	Usage:
#
#		BootVolume "Destination volume name in double quotes" "Explicit path for config.plist"

#	Return Codes:
#
#		0 - Boot volume successfully changed in Clover config.plist
#		1 - Setting boot volume failed for specified Clover config.plist
#
# 	Copyright (C) tonymacx86 LLC

NEW_BOOT=${1}

CONFIG_PLIST=${2}

if /usr/libexec/PlistBuddy -c "Set Boot:DefaultVolume ${NEW_BOOT}" ${CONFIG_PLIST} ; then
	exit 0
else
	exit 1
fi

