#!/bin/sh


BOOTIMAGE=$1
if [ `/usr/ucb/whoami` != "root" ]; then
        echo "You Must be root."
        exit 1
fi
if [ ! "$BOOTIMAGE" -o "$1" = '-h' -o "$BOOTIMAGE" = '-help' ]; then
        echo "Usage: cd0_setup [Solaris boot image absolute path] {net|cd}."
        exit 1
fi


SRC=`pwd`

echo "Starting cd0 mini-root setup"
echo ""
touch $BOOTIMAGE/.cd0toc
sh install_files $BOOTIMAGE
if [ $? -ne 0 ];then
	echo install_files failed
	exit 1
fi
sh install_wizards cd0 $BOOTIMAGE
sh install_locales cd0 $BOOTIMAGE

echo ""
echo "Finished cd0 setup"
