#!/bin/sh
# $BSDnet$

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

/sbin/ifconfig cc0 up # Needed for ccr(4) before enabling geli encrypted swap devices. We don't care about errors (on other systems).

/sbin/swapon -a || exit

/sbin/fsck -p || exit

if [ -f /etc/wall_cmos_clock ]; then
  /sbin/adjkerntz -i || exit;
fi

/sbin/mount -u / || exit

if /bin/df -Tt zfs / >/dev/null; then
  /sbin/zfs mount -av || exit;
fi

/sbin/mount -al || exit

if [ -f /etc/wall_cmos_clock ]; then
  /usr/bin/killall -TERM adjkerntz || exit;
fi

/etc/netstart || exit
/etc/rc.d/syscons start || exit
/etc/rc.d/moused start || exit

/bin/df -h /
