@echo off
rem ********************************************************************************
rem *
rem * USRVARS.BAT
rem *
rem * This file contains the user variables for controlling the ServerGuide Scripting 
rem * Toolkit.  Setting these variables allows the user to customize the 
rem * the ServerGuide Scripting Toolkit processes.
rem *
rem * This batch file is called by the autoexec.bat.
rem *
rem ********************************************************************************


REM [General_Toolkit]
    rem *********************************************************************
    rem * Defines the fully qualified path to Scripting Toolkit assembly 
    rem * directory
    rem *********************************************************************
    set TAS_PATH=%TKDRV%\%TASDIR%

    rem *********************************************************************
    rem * Defines the fully qualified path to Scripting Toolkit files
    rem *********************************************************************
    set TK_PATH=%TAS_PATH%\%TKDIR%


    rem *********************************************************************
    rem * Defines the type of deployment.
    rem * Valid values are: 
    rem *     
    rem *   1 - Deployment via a writable media - disable media during process.
    rem *       
    rem *       Boot media will be disabled during the deployment process 
    rem *       by running alboot.exe, allowing for automation of the 
    rem *       deployment process.
    rem *     
    rem *   2 - Deployment via a non-writable media - user will be prompted
    rem *     
    rem *       The boot media is write protected, user will be prompted to 
    rem *       remove the non-writable boot media.  
    rem *       (REQUIRED for bootable CDs)
    rem *     
    rem *   3 - Deployment will be via a virtual floppy.
    rem *     
    rem *       Deployment is either through a RSA-II adapter or a BladeCenter
    rem *       Management Module.  The deployment process will exit 
    rem *       automatically so that the boot media can be unmounted.
    rem *     
    rem *  RESERVED:
    rem *
    rem *   4 - Deployment using Altiris(R) Deployment Solution.
    rem *     
    rem *       The Scripting Toolkit will be used in conjunction with the 
    rem *       Altiris Deployment Solution product.
    rem *     
    rem *   5 - Deployment using Microsoft(R) Automated Deployment Services.
    rem *     
    rem *       The Scripting Toolkit will be used in conjunction with the 
    rem *       Microsoft Automated Deployment Services product.
    rem *********************************************************************
    set DPLY_TYPE=4


rem [Linux_Install]
    rem *********************************************************************
    rem * Defines the OS Type for installation. 
    rem * Valid values are: 
    rem *                  redhat, suse, vmware
    rem *********************************************************************
    set OS_TYPE=redhat

    rem *********************************************************************
    rem * Defines the OS directory under %TAS_PATH%\os\
    rem *********************************************************************
    set OS_PATH=rhas3

    rem *********************************************************************
    rem * Defines the file name of the kickstart/autoYAST file.
    rem * Note:
    rem * For Red Hat installations this file is usually:
    rem * rhas3ks.cfg
    rem *
    rem * For SUSE installations this path is usually:
    rem * sles9.xml
    rem *********************************************************************
    set ANS_FILE=rhas3ks.cfg

    rem *********************************************************************
    rem * Defines the kickstart/autoYAST URL to be pass to the kernel
    rem *********************************************************************
    set ANS_URL=http://%SRV_IP%/%TASDIR%/%TKDIR%/examples/linux/%OS_TYPE%/%ANS_FILE%

    rem *********************************************************************
    rem * Defines the fully qualified url to the OS directory
    rem * 
    rem * SLES Note:
    rem * For SLES9 change to ftp
    rem 
    rem * KickStart Note:  
    rem *        For Red Hat or VMware, if this variable is left blank, then the url  
    rem *        MUST be included in the kickstart file.
    rem *********************************************************************
    set OS_URL=http://%SRV_IP%/%TASDIR%/os/%OS_PATH%

:LINTYPE
rem ********************************************************************************
rem * Check the OS installation type to determine kernel parameters needed.
rem ********************************************************************************
if "%OS_TYPE%"=="REDHAT" goto REDHAT
if "%OS_TYPE%"=="redhat" goto REDHAT
if "%OS_TYPE%"=="SUSE" goto SUSE
if "%OS_TYPE%"=="suse" goto SUSE
if "%OS_TYPE%"=="VMWARE" goto VMWARE
if "%OS_TYPE%"=="vmware" goto VMWARE

:REDHAT
    rem *********************************************************************
    rem * REDHAT SPECIFIC VARIABLES
    rem *********************************************************************

    rem *********************************************************************
    rem * Defines the fully qualified path to the network installation kernel
    rem *********************************************************************
    set KRL_PATH=%TAS_PATH%\os\%OS_PATH%\images\pxeboot

    rem *********************************************************************
    rem * Defines the file name of the network installation kernel file.
    rem * 
    rem * NOTE:  Be sure to use the 8.3 naming convention, as the Scripting
    rem *        Toolkit will access this file name under DOS.
    rem *********************************************************************
    set KRL_FILE=vmlinuz

    rem *********************************************************************
    rem * Defines the fully qualified path to the network ram disk image. 
    rem *********************************************************************
    set IRD_PATH=%TAS_PATH%\os\%OS_PATH%\images\pxeboot

    rem *********************************************************************
    rem * Defines the file name of the network installation ram disk image
    rem * file.
    rem *
    rem * NOTE:  Be sure to use the 8.3 naming convention, as the Scripting
    rem *        Toolkit will access this file name under DOS.
    rem *********************************************************************
    set IRD_FILE=initrd.img

    rem *********************************************************************
    rem * Defines the network adapter to use during the deployment process
    rem *
    rem * NOTE:  Setting this variable is recommended for target machines
    rem *        with more than one network interface card (NIC).
    rem * EXAMPLE:
    rem *         DPY_NIC=eth1
    rem *********************************************************************
    set DPY_NIC=link

GOTO COMMON

:SUSE
    rem *********************************************************************
    rem * SUSE SPECIFIC VARIABLES
    rem *********************************************************************

    rem *********************************************************************
    rem * Defines the fully qualified path to the network installation kernel
    rem *********************************************************************
    set KRL_PATH=%TAS_PATH%\os\%OS_PATH%\boot\loader

    rem *********************************************************************
    rem * Defines the file name of the network installation kernel file.
    rem * 
    rem * NOTE:  Be sure to use the 8.3 naming convention, as the Scripting
    rem *        Toolkit will access this file name under DOS.
    rem *********************************************************************
    set KRL_FILE=linux

    rem *********************************************************************
    rem * Defines the fully qualified path to the network ram disk image.
    rem *********************************************************************
    set IRD_PATH=%TAS_PATH%\os\%OS_PATH%\boot\loader

    rem *********************************************************************
    rem * Defines the file name of the network installation ram disk image
    rem * file.
    rem *
    rem * NOTE:  Be sure to use the 8.3 naming convention, as the Scripting
    rem *        Toolkit will access this file name under DOS.
    rem *********************************************************************
    set IRD_FILE=initrd

    rem *********************************************************************
    rem * Defines the network adapter to use during the deployment process
    rem *
    rem * NOTE:  Setting this variable is recommended for target machines
    rem *        with more than one network interface card (NIC).
    rem * EXAMPLE:
    rem *         DPY_NIC=eth1
    rem *********************************************************************
    set DPY_NIC=

GOTO COMMON

:VMWARE
    rem *********************************************************************
    rem * VMware ESX SPECIFIC VARIABLES
    rem *********************************************************************

    rem *********************************************************************
    rem * Defines the fully qualified path to the network installation kernel
    rem *********************************************************************
    set KRL_PATH=%TAS_PATH%\os\%OS_PATH%\images\pxeboot

    rem *********************************************************************
    rem * Defines the file name of the network installation kernel file.
    rem * 
    rem * NOTE:  Be sure to use the 8.3 naming convention, as the Scripting
    rem *        Toolkit will access this file name under DOS.
    rem *********************************************************************
    set KRL_FILE=vmlinuz

    rem *********************************************************************
    rem * Defines the fully qualified path to the network ram disk image. 
    rem *********************************************************************
    set IRD_PATH=%TAS_PATH%\os\%OS_PATH%\images\pxeboot

    rem *********************************************************************
    rem * Defines the file name of the network installation ram disk image
    rem * file.
    rem *
    rem * NOTE:  Be sure to use the 8.3 naming convention, as the Scripting
    rem *        Toolkit will access this file name under DOS.
    rem *********************************************************************
    set IRD_FILE=initrd.img


    rem *********************************************************************
    rem * Defines the network adapter to use during the deployment process
    rem *
    rem * NOTE:  Setting this variable is recommended for target machines
    rem *        with more than one network interface card (NIC).
    rem * EXAMPLE:
    rem *         DPY_NIC=eth1
    rem *********************************************************************
    set DPY_NIC=eth0

GOTO COMMON




:COMMON
    rem *********************************************************************
    rem * COMMON LINUX VARIABLES
    rem *********************************************************************

    rem *********************************************************************
    rem * Defines the fully qualified path to the syslinux directory.
    rem *********************************************************************
    set SL_PATH=%TAS_PATH%\osutils\syslinux

    rem *********************************************************************
    rem * Defines optional kernel parameters to be passed to boot kernel.
    rem * echo [kernel options] > %RAMDSK%\usrvars.tmp
    rem * NOTE:  Each kernel option MUST be separated by a space.
    rem * NOTE:  Keep all kernel parameters on one line only.
    rem * 
    rem * EXAMPLE with one parameter:
    rem * echo apic > %RAMDSK%\usrvars.tmp
    rem * EXAMPLE with two parameters:
    rem * echo nousbstorage acpi=noirq > %RAMDSK%\usrvars.tmp
    rem *********************************************************************
    rem echo > %RAMDSK%\usrvars.tmp

    rem *********************************************************************
    rem * Defines the size of the Linux RAM disk to use in kilobytes (KB)
    rem *
    rem * NOTE:  This value must be greater than or equal to the size of the
    rem *        initial ramdisk image (initrd) after it is decompressed.
    rem * 
    rem * 	 This value for SUSE installs MUST be 65536 or higher.
    rem *********************************************************************
    set RDSK_SZ=65536



REM [Toolkit_Updates]
    rem *********************************************************************
    rem * Determine whether to perform ANY updates or not.
    rem * Valid values:
    rem *   N - No, do not perform any updates.
    rem *   Y - Yes, perform any updates.
    rem *********************************************************************
    set DO_UPDS=N

    rem *********************************************************************
    rem * Defines whether to perform system BIOS updates or not.
    rem * Valid values:
    rem *   N - No, do not perform system BIOS updates.
    rem *   Y - Yes, perform system BIOS updates.
    rem *********************************************************************
    set UPD_BIOS=N

    rem *********************************************************************
    rem * Defines whether to perform IBM ServeRAID firmware updates or not.
    rem * Valid values:
    rem *   N - No, do not perform IBM ServeRAID firmware updates.
    rem *   Y - Yes, perform IBM ServeRAID firmware updates.
    rem *********************************************************************
    set UPD_SR=N

    rem *********************************************************************
    rem * Defines the base directory for the BIOS update files to use. This 
    rem * value will be combined with UPD_PATH to define the fully qualified
    rem * path to the BIOS update files.
    rem *********************************************************************
    set UPD_BDIR=%MACHTYPE%\BIOS

    rem *********************************************************************
    rem * Defines the base directory for the ServeRAID update files to use.
    rem * This value will be combined with UPD_PATH to define the fully
    rem * qualified path to the ServeRAID firmware update files.
    rem * For adapters 4H, 4Mx, 4Lx, 5i, 6i, 6i+, 6M, 7k
    rem *********************************************************************
    set UPD_SDIR=srvraid
    
    rem *********************************************************************
    rem * Defines the base directory for the ServeRAID update files to use.
    rem * This value will be combined with UPD_PATH to define the fully
    rem * qualified path to the ServeRAID firmware update files.
    rem * For adapter 8k
    rem *********************************************************************
    set UPD_SV8K=svraid8k

    rem *********************************************************************
    rem * Defines the base directory for the ServeRAID update files to use.
    rem * This value will be combined with UPD_PATH to define the fully
    rem * qualified path to the ServeRAID firmware update files.
    rem * For adapter 8i
    rem *********************************************************************
    set UPD_SV8I=svraid8i
    
    rem *********************************************************************
    rem * Defines the base directory for the ServeRAID update files to use.
    rem * This value will be combined with UPD_PATH to define the fully
    rem * qualified path to the ServeRAID firmware update files.
    rem * For adapter 8s
    rem *********************************************************************
    set UPD_SV8S=svraid8s

    rem *********************************************************************
    rem * Defines the fully qualified path to the BIOS/firmware files
    rem * to be used for the updates.
    rem *********************************************************************
    set UPD_PATH=%TAS_PATH%\updates


REM [RAID_Configuration]
    rem *********************************************************************
    rem * Defines whether to perform ANY type of RAID configuration.
    rem * Valid values are:
    rem *   N - No, do not perform any RAID configuration.
    rem *   Y - Yes, Perform RAID configuration.
    rem *********************************************************************
    set CFG_RD=N

    rem *********************************************************************
    rem * Defines the fully qualified path to the RAID configuration files.
    rem *********************************************************************
    set RD_PATH=%TK_PATH%\examples\raid

    rem *********************************************************************
    rem * Defines the RAID configuration file name (the PRAID policies file) 
    rem * to use when configuring the RAID controllers.  
    rem * Valid values:
    rem *   "" (blank) - Configure the RAID using default values 
    rem *                (PRAID '/d' parameter).
    rem *   Filename   - Configure the RAID using a PRAID policies file.
    rem *********************************************************************
    set RD_FILE=

    rem *********************************************************************
    rem * Defines whether the installation should stop if at least one 
    rem * RAID controller could not be configured because no PRAID policy 
    rem * was available to configure the controller.   
    rem * Valid values:
    rem *   N - No, Do not stop if there was no policy to configure a RAID 
    rem *       controller.
    rem *   Y - Yes, Stop if there is no policy to configure at least one 
    rem *       RAID controller. 
    rem *********************************************************************
    set RD_ERR1=N

    rem *********************************************************************
    rem * Defines whether the installation should stop if no supported 
    rem * RAID controllers were found in the system.  
    rem * Valid values:
    rem *	N - No, Do not stop if no supported RAID controllers were found.
    rem *	Y - Yes, Stop if no supported RAID controllers were found.
    rem *********************************************************************
    set RD_ERR2=N

