--- /dev/null
+Package: *
+Pin: release a=xenial
+Pin-Priority: -100
# Uncomment this lines to enable the backports optional repository
deb http://mirror.fsf.org/trisquel/ flidas-backports main
deb-src http://mirror.fsf.org/trisquel/ flidas-backports main
+
+# needed for debootstrap scripts
+deb http://us.archive.ubuntu.com/ubuntu/ xenial main
\ No newline at end of file
# resolvconf because if we don't install it now we have to reboot for it to
# take effect.
PACKAGES install GRUB_PC
-grub-pc cryptsetup btrfs-tools sudo bridge-utils netcat-openbsd resolvconf lsof
+grub-pc cryptsetup btrfs-tools mbuffer sudo bridge-utils netcat-openbsd resolvconf lsof
PACKAGES install GRUB_EFI
-grub-efi cryptsetup btrfs-tools sudo bridge-utils netcat-openbsd resolvconf lsof
+grub-efi cryptsetup btrfs-tools mbuffer sudo bridge-utils netcat-openbsd resolvconf lsof
#resolvconf because dpkg-reconfigure on it has this message in flidas:
isc-dhcp-client
PACKAGES install GRUB_PC
-grub-pc cryptsetup btrfs-tools bridge-utils netcat-openbsd lsof
+grub-pc cryptsetup btrfs-tools mbuffer bridge-utils netcat-openbsd lsof
PACKAGES install XORG
ubuntu-desktop
usage() {
cat <<EOF
-usage: ${0##*/} [-h|--help] [HOSTNAME|IP|default]
+usage: ${0##*/} [OPTIONS] [HOSTNAME|IP|default]
Sets up tftp pxe config and nfs server on host "faiserver".
to disable the nfs server.
-S sets FAI_ACTION=sysinfo, and remove fai flag reboot.
- Usefull for doing a system recovery.
+ Usefull for doing a system recovery. It reboots automatically anyways :(
+-k Add serial port output for kgped16
+-i sets FAI_ACTION=inventory and remove fai flag reboot.
+ I'm not sure what this is usefull for.
-h|--help Print help and exit.
EOF
-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
+if [[ $host == $(./chost $HOSTNAME) ]]; then
+ ./myfai-chboot-local "$@"
+else
+ ssh root@$host bash -s "$@" <myfai-chboot-local
+fi
#!/bin/bash
-
# note, this script gets piped to bash, so cant cd to current dir
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+kgped16=false
fai_action=install
fai_reboot_arg=,reboot
-case $1 in
- -h|--help)
- echo "see help from myfai-chboot"
- exit 0
- ;;
- -S)
- fai_action=sysinfo
- fai_reboot_arg=
- shift
- ;;
- -i) #inventory
- fai_action=inventory
- fai_reboot_arg=
- shift
- ;;
-esac
+while [[ $1 == -* ]]; do
+ case $1 in
+ -h|--help)
+ echo "see help from myfai-chboot"
+ exit 0
+ ;;
+ -S)
+ fai_action=sysinfo
+ fai_reboot_arg=
+ shift
+ ;;
+ -i) #inventory
+ fai_action=inventory
+ fai_reboot_arg=
+ shift
+ ;;
+ -k)
+ kgped16=true;
+ shift
+ ;;
+ esac
+done
[[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE}" "$@"
rm -f /srv/tftp/fai/pxelinux.cfg/*
if [[ ! $1 ]]; then
+ echo "$0: clearing pxe config and exiting"
exit 0
fi
acks=2
wait=false
chboot_args=()
-temp=$(getopt -l help adrSwh "$@") || usage 1
+temp=$(getopt -l help adrSkwh "$@") || usage 1
eval set -- "$temp"
while true; do
case $1 in
### network config
###
-ssid=cmc2
-lan=10.1.0.0
+ssid="check out gnu.org"
+lan=10.0.0.0
mask=255.255.0.0
l=${lan%.0}
wireless_restart=true
key=pictionary49
for x in 0 1; do
- if [[ $(uci get wireless.default_radio$x.ssid) != $ssid ]]; then
- uci set wireless.default_radio$x.ssid=$ssid
+ if [[ $(uci get wireless.default_radio$x.ssid) != "$ssid" ]]; then
+ v uci set wireless.default_radio$x.ssid="$ssid"
wireless_restart=true
fi
if [[ $(uci get wireless.default_radio$x.key) != $key ]]; then
- uci set wireless.default_radio$x.key=$key
+ v uci set wireless.default_radio$x.key=$key
wireless_restart=true
fi
if [[ $(uci get wireless.default_radio$x.encryption) != $key ]]; then
- uci set wireless.default_radio$x.encryption=$key
+ v uci set wireless.default_radio$x.encryption=$key
wireless_restart=true
fi
if [[ $(uci get wireless.default_radio$x.disabled 2>/dev/null) ]]; then
- uci delete wireless.default_radio$x.disabled
+ v uci delete wireless.default_radio$x.disabled
wireless_restart=true
fi
done