Variables

From FAIWiki

Jump to: navigation, search

The following Variables do exist in FAI (example values included):

Please do not edit that much, without contacting Mrfai. Currently it's my private list of variable and comments.

type: int = internal use only; CS used in config space (often defined by *.var)

Which variables are needed inside the nfsroot, so the install clients can use them? (maybe write them into fai-client.var or nfsroot.var). Then do not copy fai.conf into the nfsroot any more.

nametypeexample valuecreated byused by comments
--
FAI_CONFIG_SRCnfs://faiserver/srv/fai/configmake-fai-nfsrootget-config-dir m-f-n writes its value to $NFSROOT/etc/fai/fai.conf
FAI_FLAGS'createvt sshd' kernel command line, fai-chboot define_fai_flags() rename flags, e.g $flag_sshd
FAI_ACTIONinstall, sysinfo, softupdate fai-chboot via kernel command linesave_log_local() save_log_remote_shell() save_log_remote() get_bootp_info() task_action(), fai-savelog-ftp, updatebase
--
FAI/var/lib/fai/configfai.confalmost every functionlocation of the CS on the client
LOGUSER fai fai.conf fai-setup, fai-savelog, fai-savelog-ftp,task_chboot()empty LOGUSER will disable logging
NFSROOT/srv/fai/nfsroot/make-fai-nfsroot.conf fai-setup, make-fai-nfsroot, fai-cd, fai-mirror, make-fai-bootfloppy not needed in $NFSROOT, only needed on the install server
TFTPROOT/srv/tftp/faimake-fai-nfsroot.conf make-fai-nfsroot, fai-chboot not needed in $NFSROOT, only needed on the install server
FAI_CONFIGDIR/srv/fai/configmake-fai-nfsroot.conf*.postinst, fai-setup, fai-cd, fai-mirror, make-fai-nfsroot configs space on the server
FAI_ALLOW_UNSIGNEDCS 1 class/*.varprepareaptallow installation of packages from unsigned repositories
LOGDIR/tmp/fai fai very often mostly set to /var/log/fai/$HOSTNAME/....
LOGPASSWDCS class/*.var fai-savelog-ftp moved from fai.conf to CS
LOGREMOTEDIRCSupload class/*.varfai-savelog-ftp moved from fai.conf to CS
LOGSERVERCS class/*.var fai-savelog, fai-savelog-ftp default: LOGSERVER=$SERVER, moved from fai.conf to CS
MNTPOINT/media/mirrormake-fai-nfsroot, fai-mirror, task_mirror() influences entries in sources.list, may become a fixed path
STOP_ON_ERROR 99999 class/*.var task_error() errors greater STOP_ON_ERROR will cause fai to stop the installation
SERVERINTERFACEeth0 make-fai-nfsroot.conf fai-setup used to specify interface when building exportfs line, only needed when install server has multiple interfaces
FAI_DEBMIRROR $mirrorhost:/srv/debmirrorfai.conf move to make-fai-nfsroot.conf, but needed in $NFSROOT/../fai.conf
monserver kueppers task_confdir sendmon() name of host where faimond is running. default: monserver=$SERVER, but must be set before CS is available (e.g in fai.conf, kernel command line)
--
target/target same as $FAI_ROOT
ROOTCMD'chroot /tmp/target'almost every script
CONSOLEFONTCS class/*.var
KEYMAPCSdeclass/*.var
BOOT_PARTITIONCS/dev/sda1 setup-storage grub/menu.lst/postinst
ROOT_PARTITIONCS/dev/sda1setup-storage LILO/20-create-liloconf
UTCCSyesclass/*.var example/simple/scripts
TIMEZONECSEurope/Berlin class/*.var example/simple/scripts
liloappendCS class/*.var 20-create-liloconf
MODULESLISTCSpsmouseclass/*.var scripts/FAIBASE/10-misc
MAXPACKAGESCS300fai-mirror, install_packages limit the number of packages installed in one run
USE_SETUP_STORAGECS1class/*.var when set to 1, FAI will use the new partition tool setup-storage
FAI_BACKUPDIRCSclass/*.var fcopy directory used by fcopy for backup files
--
int/etc/faifai -c make-fai-nfsroot, fai-mirror, fai-cd, task_prepareapt, fai_init()
FAI_ROOTconst/targetbin/faialmost every script directory where the new system will be installed to, $target has the same value
fai_rundateint20060123_163824task_setup()fai-savelog
FAI_VERSIONconstFAI 3.2fai, prcopyleft()
HOST demohost given on kernel command line can redefine host name
cfclassesintDEFAULT.LINUX.LASTtask_defclass()cfagent scripts
classesintDEFAULT LINUX LASTtask_defclass()almost every script
device_sizeint'sda 71687372'set_disk_info() all disks and their sizes; may become local variable
disklistintsdaset_disk_info() setup-storage, fai-mount-disk
faimondint 0 determines if faimond is running
ipintdhcpfai-chboot via kernel append parameterget-boot-info
HOSTNAMEdemohostvery often may the hostname change during installtion? Is the hostname FQDN in some cases? numeric hostname if host-decl-name off in dhcpd.conf
HOSTTYPEintx86_64bash variable prcopyleft
netdevicesint eth0 get-boot-infoget-boot-info, task_sysinfo, dhclient-fai-script
netdevices_allint eth0 eth1 get-boot-infoget-boot-info, task_sysinfo
netdevices_upinteth0 get-boot-infoget-boot-info, task_sysinfo
nfsrootint/srv/fai/nfsroot/fai-chboot via kernel append parameterkernel may contain server's IP address, may contain nfs parameters like: v2,rsize=32768,wsize=32768
renewclass intboolean task_defclass() on softupdate recalculate the list of classes, unset after use
romountoptint-o async,noatime,ro unset after use
sendhostnameint task_confdir()sendmon() client's hostname, do not replace with $HOSTNAME, since HOSTNAME may change during installation
flag_sshdint boolean define_fai_flags()
flag_createvtintbooleandefine_fai_flags()
task_errorintinteger every task can set it formerly $terror
stampint ..._IN_PROGRESS
DEBIAN_FRONTENDintnoninteractivedpkg -i
do_init_tasksint boolean fai, task_confdir(), prcopyleft()1 if doing net or CD installations
--
BROADCAST192.168.0.127 get-boot-infoscripts/FAIBASE/30-interface
DNSSRVS192.168.1.16get-boot-info create_resolv_conf
DNSSRVS_1192.168.1.16get-boot-info first element of DNSSRV
DOMAINworkgroup.deget-boot-infotask_setup() task_prepareapt()
NETMASK255.255.255.128get-boot-info
NETWORK192.168.0.0get-boot-info
IPADDR192.168.0.14get-boot-info
GATEWAYS192.168.0.1get-boot-info
GATEWAYS_1192.168.0.1get-boot-info
SERVERkueppersget-boot-info


Variables that are unused since 3.x versions of FAI:

nametypeexample valuecreated byused by comments
FAI_REMOTECPscpfai.conf fai-savelog replaced by FAI_LOGPROTO
FAI_REMOTESHsshfai.conf fai-savelog, task_chboot() replaced by FAI_LOGPROTO
FAI_LOCATIONfaiserver:/srv/fai/configmake-fai-nfsrootget_bootp_info() get_fai_dir() get_fai_cvs() replaced by FAI_CONFIG_SRC
FAI_LOGPROTO ftpfai.conffai-setup, save_log_remote()replaces FAI_REMOTECP and FAI_REMOTESH, may be removed from fai.conf, should be defined in class/*.var, but fai-setup needs this too, maybe add option to fai-setup that determines if ssh/rsh should be set up
diskvarint$LOGDIR/disk_var.sh removed, replace with "$LOGDIR/diskvar"
lpipeint /tmp/fai/logfifo variable removed, try to remove the ugly hack using it
FAI_BOOTdhcp bootpmake-fai-nfsrootremoved from fai.conf, now using default value, BOOTP is not supported any more
DNSDOMAINworkgroup.detask_setup() removed
installserverkueppersfai.conf only for building FAI_LOCATION removed
mirrorhost192.168.0.8fai.conf make-fai-nfsroot.conf, $FAI_DEBOOTSTRAP, $FAI_DEBMIRROR, NFSROOT_ETC_HOSTS removed
fstabintfstab was used for solaris, fstab -> vfstab removed
VIDEODRIVERCSmga20-hwdetect.source scripts/DEMO/10-misc removed with Xorg

useful oneliners

find all files not under a ".svn" directory and replace the string '$diskvar' with '$LOGDIR/diskvar'

Test:

find -name '.svn' -prune -o -type f -exec perl -n -e 's/\$diskvar/\$LOGDIR\/diskvar/g && print' {} \;

find -name '.svn' -prune -o -type f -exec perl -p -e 's/\$diskvar/\$LOGDIR\/diskvar/g' {} \; | less

Really replace: ( same, but "i" added )

find -name '.svn' -prune -o -type f -exec perl -pi -e 's/\$diskvar/\$LOGDIR\/diskvar/g' {} \;

More info:

perldoc perlrun

man find

Personal tools