scp /a/bin/devbyid root@$faiserver_host:/srv/fai/nfsroot/usr/local/bin
ssh root@$faiserver_host bash <<'EOF'
set -eE -o pipefail
+set -x
chmod 644 /srv/fai/config/files/home/ian/.ssh/authorized_keys/GRUB_PC
chmod -R a+rX /srv/fai/config/distro-install-common
cd /srv/fai/config/basefiles
u=http://fai-project.org/download/basefiles/XENIAL64.tar.xz
-wget -nv -O /srv/fai/config/basefiles/${u##*/} $u
+wget -nv -N $u
EOF
# We check the reverse condition in 51-multi-boot,
# and set what os we are installing, but don't check it
# into git since it changes regularly. Each host needs
-# to have a class of either DEBIAN + STABLE or STRETCH64,
+# to have a class of either DEBIAN + (STABLE or STRETCH64),
# or UBUNTU + XENIAL64.
#
# It's shell looks like this:
done
if [[ ! $DISTRO ]]; then
- if ifclass STABLE; then
+ if ifclass STRETCH64; then
+ DISTRO=debiantesting
+ elif ifclass STABLE; then
DISTRO=debianstable
+ elif ifclass XENIAL64; then
+ DISTRO=ubuntuxenial
else
- DISTRO=debiantesting
+ echo "PARTITIONER ERROR: no distro class/var set" >&2
+ exit 1
fi
fi
-
case ${#boot_devs[@]} in
# need double the space if we are raid 10, and then
# might as well give some extra overhead.
EOF
-# these 2 are alternative ways to identify a subvol, i think i prefer the 2nd.
+# I will avoid using uuid in the future.
if ifclass treetowl; then
cat >> /tmp/fai/fstab <<'EOF'
$first_root_crypt /i btrfs noatime,subvol=i 0 0
UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs noatime 0 2
EOF
fi
-if ifclass frodo; then
- cat >> /tmp/fai/fstab <<'EOF'
-$first_root_crypt /i btrfs noatime,subvol=i 0 0
-EOF
-fi
swaps=()
for dev in ${devs[@]}; do
on debian, there is a 3rd one shortly after the 2nd. I can't remember
exactly why this caused a problem, but I'm hoping the sleep
will take care of it.
+-w Initially setup pxe, then wait like -a.
-h|--help Print help and exit
redep=true
acks=2
wait=false
-temp=$(getopt -l help hra "$@") || usage 1
+temp=$(getopt -l help harw "$@") || usage 1
eval set -- "$temp"
while true; do
case $1 in
- -h|--help) usage ;;
+ -a) wait=true; set=false; shift ;;
-r) redep=false; shift ;;
- -a) wait=true; shift ;;
+ -w) wait=true; set=true; shift ;;
+ -h|--help) usage ;;
--) shift; break ;;
*) echo "$0: Internal error!" ; exit 1 ;;
esac
if [[ $type == arch ]]; then arch-pxe-mount; fi"
}
-set-pxe
-if [[ $type == fai ]]; then
- if $redep; then
- fai-redep
+if $set; then
+ set-pxe
+
+ if [[ $type == fai ]]; then
+ if $redep; then
+ fai-redep
+ fi
+ faiserver-enable
fi
- faiserver-enable
fi
if $wait; then