e938a345b5
This is not referred to later so I assume it was debugging at some point.
44 lines
1.3 KiB
Bash
44 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# make install or pkg_add script
|
|
# Checks labels/gptids for roots and swap partitions
|
|
# adds hyperv labels in loader.conf
|
|
#
|
|
|
|
if [ "$2" = "PRE-INSTALL" ]; then
|
|
echo "===> Pre-install Check"
|
|
|
|
#rootfs check
|
|
root_flag=$(mount | awk '/ on \/ / { print $1 }' | cut -d / -f3-)
|
|
if [ "$root_flag" != "" ]; then
|
|
fs_test=$(glabel status | awk '{print $1}' | grep $root_flag)
|
|
if [ "$fs_test" == "" ]; then
|
|
echo " xxx rootfs Label/gptid missing in fstab"
|
|
fi
|
|
else
|
|
echo " xxx rootfs Label/gptid missing in fstab"
|
|
fi
|
|
#swap check
|
|
[ -f /etc/fstab ] && swap_flag=$(grep swap /etc/fstab | awk '{print $1}' | cut -d / -f3-)
|
|
if [ "$swap_flag" != "" ]; then
|
|
sw_test=$(glabel status | awk '{print $1}' | grep $swap_flag)
|
|
if [ "$sw_test" == "" ]; then
|
|
echo " xxx swap Label/gptid missing in fstab"
|
|
fi
|
|
else
|
|
echo " xxx swap Label/gptid missing in fstab "
|
|
fi
|
|
|
|
if [ "$fs_test" != "" -a "$sw_test" != "" ]; then
|
|
echo "===> Labels/gptids Found"
|
|
echo "===> Hyper-V BIS Installation Continues"
|
|
else
|
|
echo "===> Labels/gptids Not found"
|
|
echo "===> Hyper-V BIS Installation Aborted"
|
|
echo "===> Refer to Disk UUID section in README document"
|
|
echo "===> Please refer the Prerequisites page and complete all steps"
|
|
echo "WWW: https://github.com/FreeBSDonHyper-V/Hyperv-Ports/wiki/Prerequisites "
|
|
exit 1
|
|
fi
|
|
fi
|
|
exit 0
|