mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 17:20:12 +01:00
add ZFS check on bootstrap
This commit is contained in:
@@ -42,7 +42,21 @@ help|-h|--help)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Validate ZFS parameters first.
|
||||
#Validate if ZFS is enabled in rc.conf and bastille.conf.
|
||||
if [ "$(sysrc -n zfs_enable)" = "YES" ] && [ ! "${bastille_zfs_enable}" = "YES" ]; then
|
||||
warn "ZFS is enabled in rc.conf but not bastille.conf. Do you want to continue? (N|y)"
|
||||
read answer
|
||||
case $answer in
|
||||
no|No|n|N|"")
|
||||
error_exit "ERROR: Missing ZFS parameters. See bastille_zfs_enable."
|
||||
;;
|
||||
yes|Yes|y|Y)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Validate ZFS parameters.
|
||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
||||
## check for the ZFS pool and bastille prefix
|
||||
if [ -z "${bastille_zfs_zpool}" ]; then
|
||||
@@ -61,19 +75,6 @@ if [ "${bastille_zfs_enable}" = "YES" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$(sysrc -n zfs_enable)" = "YES" ] && [ ! "${bastille_zfs_enable}" = "YES" ]; then
|
||||
warn "ZFS is enabled in rc.conf but not bastille.conf. Do you want to continue? (N|y)"
|
||||
read answer
|
||||
case $answer in
|
||||
no|No|n|N|"")
|
||||
error_exit "ERROR: Bootstrap interrupted"
|
||||
;;
|
||||
yes|Yes|y|Y)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
validate_release_url() {
|
||||
## check upstream url, else warn user
|
||||
if [ -n "${NAME_VERIFY}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user