# Scripts to setup the environment for the install
-sudo fai-cd grub.cfg.autodiscover -f -A $BASEFILE_DIR/autodiscover.iso # create autodiscover cd
+sudo fai-cd -g grub.cfg.autodiscover -f -A $BASEFILE_DIR/autodiscover.iso # create autodiscover cd
mymk-basefile # Create basefiles for various distros
arch-pxe # Setup arch pxe boot server from an arch base image
fai-redep # Deploy fai configuration to host "faiserver"
sleep 2
else
fai-monitor&
- if [[ $BASEFILE_DIR ]]; then
+ if [[ ! $BASEFILE_DIR ]]; then
BASEFILE_DIR=/tmp
fi
if [[ ! -e $BASEFILE_DIR/autodiscover.iso ]]; then
- fai-cd grub.cfg.autodiscover -f -A $BASEFILE_DIR/autodiscover.iso
+ fai-cd -g grub.cfg.autodiscover -f -A $BASEFILE_DIR/autodiscover.iso
fi
boot_arg="--cdrom $BASEFILE_DIR/autodiscover.iso"
e fai-redep
-h|--help) usage ;;
esac
+kgped16=false # default
+temp=$(getopt -l help hk "$@") || usage 1
+eval set -- "$temp"
+while true; do
+ case $1 in
+ -k) kgped16=true; shift ;;
+ -h|--help) usage ;;
+ --) shift; break ;;
+ *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
+ esac
+done
+
host=$(./chost faiserver)
ssh root@$host bash -s -- "$@" <myfai-chboot-local
# example of default_k_args
# initrd=initrd.img-3.16.0-4-amd64 ip=dhcp root=192.168.1.3:/srv/fai/nfsroot aufs FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config FAI_ACTION=install
-k_args=(console=tty0 console=ttyS0,115200 FAI_ACTION=$fai_action)
+k_args=(FAI_ACTION=$fai_action)
+if $kgped16; then
+ k_args+=(console=tty0 console=ttyS0,115200)
+fi
+
for arg in $default_k_args; do
case $arg in
# default root arg is /srv/fai/nfsroot
after the 2nd. I can't remember exactly why this caused a
problem, but I'm hoping the sleep will take care of it.
-S sets FAI_ACTION=sysinfo, see myfai-chboot for more info.
+-k Pass -k to myfai-chboot.
-w Setup pxe, then wait like -a.
-h|--help Print help and exit
redep=true
acks=2
wait=false
+chboot_args=()
temp=$(getopt -l help adrSwh "$@") || usage 1
eval set -- "$temp"
while true; do
-a) wait=true; set=false; shift ;;
-d) dhcp=false; shift ;;
-r) redep=false; shift ;;
- -S) chboot_arg=-S; shift ;;
+ -S) chboot_args+=(-S); shift ;;
+ -k) chboot_args+=(-k); shift ;;
-w) wait=true; set=true; shift ;;
-h|--help) usage ;;
--) shift; break ;;
if $set; then
set-pxe
if [[ $type == fai ]]; then
- e myfai-chboot $chboot_arg $host
+ e myfai-chboot ${chboot_args[@]} $host
if $redep; then
e fai-redep
fi