machine_setup/ansible/roles/build/files/freebsd_update_step2
2022-10-15 21:40:41 -04:00

20 lines
458 B
Bash

#!/usr/bin/env bash
#
# Build and installs whatever is in /usr/src. Run step 1, reboot, then step 2.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
sudo etcupdate -p
cd /usr/src
sudo make installworld
sudo etcupdate -B
if sudo etcupdate status | grep -qE '^ C '; then
>&2 echo 'Conflicts in etcupdate. Run `etcupdate resolve` to fix them first.'
exit 1
fi
echo "FreeBSD update step 2 done. Please reboot."