First issue
[fbsd-stable-mgmt.git] / update_stage1.sh
diff --git a/update_stage1.sh b/update_stage1.sh
new file mode 100755 (executable)
index 0000000..c4a0442
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+zfs_mount()
+{
+echo Mount zfs disk
+zfs set readonly=off llroot
+zfs mount -a
+adjkerntz -i
+/etc/rc.d/syscons start
+}
+
+
+mountro=`zfs get -H readonly llroot/ROOT/master | cut -w -f 3`
+[ ${mountro} = "on" ] && zfs_mount
+mergemaster -p
+cd /usr/src && \
+make installworld && \
+mergemaster -iF && \
+make delete-old && \
+echo "reboot to delete old libs"
+