Usage: ${0##*/} [OPTIONS] [HOST TYPE]
Configure dnsmasq pxe server options and fai-chboot if appropriate.
-
Without HOST TYPE, disable pxe server and fai server.
-TYPE is one of arch, plain, fai.
-HOST is a hostname known to the dhcp server, or default for all
-Note, when switching between plain and arch, you will need to
-do something like:
-ssh wrt
-cd /mnt/usb
-rm tftpboot
-ln -s <arch/debian iso dir> tftpboot
+
+HOST A hostname known to the dhcp server, or default for all.
+TYPE One of arch, plain, fai.
-r Don't redeploy fai config. For example, if there is a different host
-h|--help Print help and exit
+Note, when switching between plain and arch, you will need to
+do something like:
+ssh wrt
+cd /mnt/usb
+rm tftpboot
+ln -s <arch/debian iso dir> tftpboot
+
+
Note: Uses GNU getopt options parsing style
EOF
exit $1
##### begin command line parsing ########
-args=()
redep=true
acks=2
wait=false
esac
done
-read host type <<<"$@"
+read -r host type <<<"$@"
case $# in
0|2);;
fai() {
cat <<EOF
-$set_host_tag
dhcp-boot=${host_tag}pxelinux.0,faiserver.lan,faiserver.lan
EOF
}
fi
regex=".*DHCPACK.*$host_regex$"
i=0
- tmp=$(mktemp)
- while (( i != wait_count )) && read line; do
+ while (( i != wait_count )) && read -r line; do
if [[ $line =~ $regex ]]; then
i=$((i+1))
echo $line