take a snapshot before upgrading
[fbsd-stable-mgmt.git] / update_stage1.sh
1 #!/bin/sh
2 zfs_mount()
3 {
4 echo Mount zfs disk
5 zfs set readonly=off llroot
6 zfs mount -a
7 adjkerntz -i
8 /etc/rc.d/syscons start
9 }
10
11
12 mountro=`zfs get -H readonly llroot/ROOT/master | cut -w -f 3`
13 [ ${mountro} = "on" ] && zfs_mount
14 usrsrc=${USRSRC:-/usr/src}
15
16 etcupdate -p && \
17 make -C ${usrsrc} installworld && \
18 etcupdate && \
19 make -C ${usrsrc} delete-old && \
20 echo "reboot to delete old libs"
21 # make -C ${usrsrc} -DBATCH_DELETE_OLD_FILES delete-old
22 # make -C ${usrsrc} -DBATCH_DELETE_OLD_FILES delete-old-libs
23