# Copyright (C) 2002 Ensim Corporation. All Rights Reserved.
#

# limits and parameters
#
ENSIM_MINROOTFSSIZE=2000
ENSIM_MINSWAPFSSIZE=256
ENSIM_MINDISKSIZE=5

if [ X"$FTP_SERVER" == X"" ];then FTP_SERVER="ftp2.ensim.com"; fi

OSI_version='7.3'
OSI_release='37'
OSI_DIR="apt/ensim/OSI/$OSI_version/$OSI_release"
OSI_DATA_DIR="apt/ensim/OSI/$OSI_version/$OSI_release/data"
OSI_RPMS_DIR="apt/ensim/OSI/$OSI_version/$OSI_release/rpms"
OSI_PUC_DIR="apt/ensim/OSI/$OSI_version/$OSI_release/RPMS.puc"
FTP_LOGIN="ensimwpl"
FTP_PASSWD="ensim94089"

#For windows user only
_q_ftpdata="ftp://$FTP_LOGIN:$FTP_PASSWD@$FTP_SERVER/$OSI_DATA_DIR/ftp.dat"
_q_httpdata="ftp://$FTP_LOGIN:$FTP_PASSWD@$FTP_SERVER/$OSI_DATA_DIR/http.dat"

# global variables
#
# global variables
_q_oemdir="/var/lib/ensim/oem" 		# RedHat RPMS
_q_cdrom="" 						# CDROM option

log_dir="/var/log/ensim/" 			# log dir for OSI 
upgrade_log="lwpupgrade.log" 		# logs for OSI 
_q_ftplogin="ensimwpl"				# login for FTP server
_q_ftppassword="ensim94089"			# passwd for FTP server
_q_upgrade=0						# upgrade [ 0/1 ]
_q_rhlrelease=""	 # RedHat release	
_q_rhl="7.3"		 # RedHat release for OSI 7.3	
_q_boot="y"			 # GRUB / LILO	
_q_installer="n"     # to use osi or not	
_q_netval=""         # net values can't be zero
_q_config="y"	     # configuration file 	
_q_choice=""         # which product to choose
_q_post_kscreat=""   # which product to choose
_q_product=""	     # which product to choose
_q_packages=""	     # which product to choose
_q_xmlparserurl=""   # which product to choose 
_q_xmlurl=""         # which product to choose 
_q_image=""	     # standard or custom boot image	
_q_bootimage=""      # which image to choose
_q_bootimage_W=""    # which image to choose (Windows pathname)
_q_ftpurl=""         # FTP url for RedHat installation tree (7.3)
_q_updatesurl=""     # FTP url for RedHat updates (7.3)
_q_ftphost=""        # FTP server
_q_ftpuser=""        # FTP username for above
_q_ftppasswd=""      # FTP password for above
_q_gateway=""        # network gateway for target machine
_q_domainname=""     # domainname 
_q_httpurl=""        # HTTP url for RedHat installation tree
_q_installsource=""  # where we are installing Linux from
_q_ipaddr=""         # IP address of target machine
_q_kb=""             # target machine keyboard type
_q_ksdump=""         # saved ks dump (for regeneration)
_q_lang=""           # language (localization)
_q_mouse=""          # target machine mouse type
_q_hostname=""       # hostname
_q_netmask=""        # netmask for target machine
_q_nameserver=""     # nameserver for target machine
_q_nameserver2=""    # nameserver for target machine
_q_nameserver3=""    # nameserver for target machine
_q_nameserver4=""    # nameserver for target machine
_q_nfsexport=""      # NFS export for RedHat installation tree
_q_nfsserver=""      # NFS server exporting the above
_q_ftpserver=""      # FTP server 
_q_ftpdir=""         # Red Hat installation Tree
_q_httpserver=""     # HTTP server
_q_httpdir=""        # Red Hat installation Tree
_q_passwd=""         # root password for the target machine
_q_adminpasswd=""    # admin password for the target machine
_q_grubpasswd=""     # grub password for the target machine
_q_partition=""      # size of swap in megabytes
_q_bootsize=50       # size of /boot in megabytes
_q_swapsize=256      # size of swap in megabytes
_q_maxswapsize=0     # max size of swap in megabytes
_q_homesize=1024     # min size of /home in megabytes
_q_rootsize=2048     # size of root in megabytes
_q_varsize=1024      # min size of /var in megabytes
_q_maxvarsize=0      # max size of /var in megabytes
_q_grow="n"	     	 # to grow
_q_clear="n"	     # clear all/linux partitions
_q_up2date=0         # argument to parser.1 if the user chooses local ftp site 
_q_disks=0           # no of disks
_q_no=0              # no of disks
_q_disksize=0        # size of disk in GB 
_q_i=0     	         # size of disk in MB
_q_tz=""             # timezone
_q_email=""          # email
_q_error="Error"     # error message	
_q_success="Success" # error message	
_q_download="Downloading" # error message	
_q_install="Installing"   # error message	
_q_updatesmsg="RedHat7.3Updates" # error message	

_q_wpinstallfile="wpinstall-u.sh"

_q_local=0
_q_installfile=""
_q_localhost=""
_q_localdir=""
_q_locallogin=""
_q_localpasswd=""

_q_local_updates=0
_q_updates_host=""
_q_updates_dir=""
_q_updates_login=""
_q_updates_passwd=""



RH_VERSION="7.3"

# helper functions sourced in
#
. $KSGENDIR/lib/appgen
. $KSGENDIR/lib/copyright
. $KSGENDIR/lib/disk
. $KSGENDIR/lib/info
. $KSGENDIR/lib/installsource
. $KSGENDIR/lib/kb
. $KSGENDIR/lib/kscreat
. $KSGENDIR/lib/lang
. $KSGENDIR/lib/mouse
. $KSGENDIR/lib/netconfig
. $KSGENDIR/lib/passwd
. $KSGENDIR/lib/tz
. $KSGENDIR/lib/util
. $KSGENDIR/lib/warning
. $KSGENDIR/lib/license
. $KSGENDIR/lib/version
. $KSGENDIR/lib/download


F_dumpks() # arg1 - filename
{
    _file="$1"
    echo ""                                          >   $_file
    echo "_q_oemdir=$_q_oemdir"		             	 >>  $_file
    echo "_q_cdrom=$_q_cdrom"		             	 >>  $_file
    echo "_q_ftplogin=$_q_ftplogin"		          	 >>  $_file
    echo "_q_ftppassword=$_q_ftppassword"		     >>  $_file
    echo "_q_upgrade=$_q_upgrade"		          	 >>  $_file
    echo "_q_rhlrelease=$_q_rhlrelease"              >>  $_file
    echo "_q_rhl=$_q_rhl"              				 >>  $_file
    echo "_q_boot=$_q_boot"                          >>  $_file
    echo "_q_bootimage=$_q_bootimage"                >>  $_file
    echo "_q_image=$_q_image"                        >>  $_file
    echo "_q_config=$_q_config"      		     >>  $_file
    echo "_q_bootimage_W=$_q_bootimage_W" | awk '{ gsub(/\\/, "\\\\"); print }'                                                      >>  $_file
    echo "_q_ftpurl=$_q_ftpurl"                      >>  $_file
    echo "_q_updatesurl=$_q_updatesurl"              >>  $_file
    echo "_q_ftphost=$_q_ftphost"                    >>  $_file
    echo "_q_ftpuser=$_q_ftpuser"                    >>  $_file
    echo "_q_ftppasswd=$_q_ftppasswd"                >>  $_file
    echo "_q_domainname=$_q_domainname"              >>  $_file
    echo "_q_httpurl=$_q_httpurl"                    >>  $_file
    echo "_q_installsource=$_q_installsource"        >>  $_file
    echo "_q_kb=$_q_kb"                              >>  $_file
    echo "_q_ksdump=$_q_ksdump"                      >>  $_file
    echo "_q_lang=$_q_lang"                          >>  $_file
    echo "_q_mouse=$_q_mouse"                        >>  $_file
    echo "_q_nfsexport=$_q_nfsexport"                >>  $_file
    echo "_q_nfsserver=$_q_nfsserver"                >>  $_file
    echo "_q_ftpserver=$_q_ftpserver"                >>  $_file
    echo "_q_httpserver=$_q_httpserver"              >>  $_file
    echo "_q_ftpdir=$_q_ftpdir"                      >>  $_file
    echo "_q_httpdir=$_q_httpdir"                    >>  $_file
    echo "_q_passwd=$_q_passwd"                      >>  $_file
    echo "_q_adminpasswd=$_q_adminpasswd"            >>  $_file
    echo "_q_grubpasswd=$_q_grubpasswd"              >>  $_file
    echo "_q_swapsize=$_q_swapsize"                  >>  $_file
    echo "_q_maxswapsize=$_q_maxswapsize"            >>  $_file
    echo "_q_homesize=$_q_homesize"	                 >>  $_file	
    echo "_q_rootsize=$_q_rootsize"	                 >>  $_file	
    echo "_q_varsize=$_q_varsize"	                 >>  $_file	
    echo "_q_maxvarsize=$_q_maxvarsize"	             >>  $_file	
    echo "_q_grow=$_q_grow"	                         >>  $_file	
    echo "_q_clear=$_q_clear"	                     >>  $_file	
    echo "_q_up2date=$_q_up2date"	                 >>  $_file	
    echo "_q_tz=$_q_tz"                              >>  $_file
    echo "_q_partition=$_q_partition"     	         >>  $_file 
    echo "_q_bootsize=$_q_bootsize"		             >>  $_file	
    echo "_q_disksize=$_q_disksize"                  >>  $_file 
    echo "_q_disks=$_q_disksize"	                 >>  $_file		
    echo "_q_no=$_q_no"	                             >>  $_file		
    echo "_q_i=$_q_i"				                 >>  $_file 
    echo "_q_email=$_q_email"                        >>  $_file   
    echo "_q_error=$_q_error"                        >>  $_file	
    echo "_q_success=$_q_success"                    >>  $_file	
    echo "_q_download=$_q_download"                  >>  $_file	
    echo "_q_install=$_q_install"                    >>  $_file	
    echo "_q_updatesmsg=$_q_updatesmsg"              >>  $_file
    echo "_q_wpinstallfile=wpinstall-u.sh"           >>  $_file  
    echo "_q_cxcinstallfile=cbm3.0.0-standalone.shar" >> $_file	
    echo "_q_local=$_q_local"		                 >>  $_file		
    echo "_q_localhost=$_q_localhost"		         >>  $_file		
    echo "_q_localdir=$_q_localdir"		             >>  $_file		
    echo "_q_locallogin=$_q_locallogin"		         >>  $_file		
    echo "_q_localpasswd=$_q_localpasswd"	         >>  $_file		
    echo "_q_local_updates=$_q_local_updates"        >>  $_file
    echo "_q_updates_host=$_q_updates_host"          >>  $_file
    echo "_q_updates_dir=$_q_updates_dir"            >>  $_file
    echo "_q_updates_login=$_q_updates_login"        >>  $_file
    echo "_q_updates_passwd=$_q_updates_passwd"      >>  $_file
	echo "_q_apturl=$_q_apturl"						 >>  $_file	
    echo "_q_ftpdata=$_q_ftpdata"                    >>  $_file
    echo "_q_httpdata=$_q_httpdata"                  >>  $_file
    echo "_q_oemdata=$_q_oemdata"                    >>  $_file
   
}
# __END__
