vSphereAutoLab/SRC/buildpop

54 lines
1001 B
Bash

#!/bin/sh
. /etc/rc.subr
name="BuildPop"
start_cmd="${name}_start"
stop_cmd=":"
BuildPop_start()
{
mkdir /mnt/cd0
mount_cd9660 /dev/cd0 /mnt/cd0
mkdir /mnt/cd1
mount_cd9660 /dev/cd1 /mnt/cd1
if [ -f "/mnt/LABVOL/Build/ESXi60/vmware-esx-base-readme" ]
then
echo "Already have ESXi 6.0 installer"
else
if [ -f "/mnt/cd0/vmware-esx-base-readme" ]
then
echo "Found ESXi installer on CD0"
cp -r /mnt/cd0/* /mnt/LABVOL/Build/ESXi60
fi
if [ -f "/mnt/cd1/vmware-esx-base-readme" ]
then
echo "Found ESXi installer on CD1"
cp -r /mnt/cd1/* /mnt/LABVOL/Build/ESXi60
fi
fi
if [ -f "/mnt/LABVOL/Build/VIM_60/autorun.exe" ]
then
echo "Already have vCentre 6.0 installer"
else
if [ -f "/mnt/cd0/autorun.exe" ]
then
echo "Found vCentre installer on CD0"
cp -r /mnt/cd0/* /mnt/LABVOL/Build/VIM_60
else
fi
if [ -f "/mnt/cd1/autorun.exe" ]
then
echo "Found vCentre installer on CD1"
cp -r /mnt/cd1/* /mnt/LABVOL/Build/VIM_60
else
fi
fi
}
load_rc_config $name
run_rc_command "$1"