vnicinit_solaris.sh revision 052395512a7cc6c1799aa823e996eb63c02891f4
42576743851c3c956ad7e867e74df1084c30d434vboxsync# VirtualBox VNIC setup script for Solaris hosts with Crossbow.
42576743851c3c956ad7e867e74df1084c30d434vboxsyncif [ -z "$1" ]; then
42576743851c3c956ad7e867e74df1084c30d434vboxsync echo "Missing MAC address."
42576743851c3c956ad7e867e74df1084c30d434vboxsync echo "Usage: $0 macaddress [vnicname]"
42576743851c3c956ad7e867e74df1084c30d434vboxsync echo " A new VNIC is created if no vnicname is provided."
42576743851c3c956ad7e867e74df1084c30d434vboxsync# Create the VNIC if required
42576743851c3c956ad7e867e74df1084c30d434vboxsyncif [ -z "$2" ]; then
42576743851c3c956ad7e867e74df1084c30d434vboxsync if [ $? != 0 ]; then
02f73b88a6e96b7f1b8ab0bbb98cfb798b566fbdvboxsync let "temp_id = $vnic_id % 900"
cdcfac625bb49f1d4b67aaf8fb8b1cdb69fe49c2vboxsync # VNIC ID is probably off the scale!
82e3a4017d20f44c30ff909e6b825ff78139cbbbvboxsyncif [ -z "$2" ]; then
c6b3d55ef646614cc689faa1fa4ddc961712b6ffvboxsync /sbin/ifconfig $vnic_name $host_ip destination $guest_ip netmask $netmask up
c6b3d55ef646614cc689faa1fa4ddc961712b6ffvboxsync# Do existing VNIC configuration here if needed...