Created
April 9, 2018 07:08
-
-
Save dch/213054fb36f7d9f8fda6f356f623a8f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# ansible managed | |
/bin/freebsd-version -ku | |
export PAGER="/bin/cat -bu" | |
cd /etc | |
test -d .git || git init . | |
git add -A | |
git commit --allow-empty -am `freebsd-version -ku | sort -r |head -1`-update | |
zfs snapshot -r zroot@`date -u +%Y%m%d-%H%M`:`freebsd-version -ku | sort -r |head -1`-update | |
beadm create `freebsd-version -ku | sort -r |head -1`-update | |
/usr/sbin/freebsd-update --not-running-from-cron fetch install || /usr/bin/true | |
echo OK freebsd-update complete | |
echo OK List Boot Environments | |
beadm list | |
echo Now you may sacrifice a goat and reboot. | |
echo After reboot, re-run "/usr/sbin/-freebsd-update install" if required | |
echo and "pkg update", then restart daemons as needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment