- do_setup_vdisk() {
- # write labels + bootsector
- bsdlabel -B -R /dev/${MD} ${LABELTMP}
- # create filesystem
- newfs /dev/${MD_ROOT}
- newfs /dev/${MD_TMP}
- newfs /dev/${MD_VAR}
- newfs /dev/${MD_USR}
- # enable softupdates
- tunefs -n enable /dev/${MD_ROOT}
- tunefs -n enable /dev/${MD_TMP}
- tunefs -n enable /dev/${MD_VAR}
- tunefs -n enable /dev/${MD_USR}
- # create mount point for virtual disk device, and mount
- mkdir -p ${VDMNT}
- mount -o noatime /dev/${MD_ROOT} ${VDMNT}
- # create mount points
- mkdir -m 0755 -p ${VDMNT}/var
- mkdir -m 0755 -p ${VDMNT}/tmp
- mkdir -m 0755 -p ${VDMNT}/usr
- # unmount and unload virtual disk device
- umount /dev/${MD_ROOT}
- }
Raw Paste