#!/bin/sh cat << EOF > /tmp/excludes.txt ./etc/resolv.conf ./etc/rc.conf ./etc/dhclient.conf ./etc/group ./etc/master.passwd ./etc/pwd.db ./etc/spwd.db ./etc/passwd EOF cd /tmp if [ -f kernel.txz ]; then rm kernel.txz fi if [ -f base.txz ]; then rm base.txz fi fetch https://download.freebsd.org/ftp/snapshots/amd64/amd64/13.0-CURRENT/kernel.txz fetch https://download.freebsd.org/ftp/snapshots/amd64/amd64/13.0-CURRENT/base.txz chflags -R noschg / cd / tar -xzf /tmp/kernel.txz tar -xz --exclude-from /tmp/excludes.txt -f /tmp/base.txz touch ${FLAGFILE} sync shutdown -r now