Refactor: check_linux_prerequisites indentation

This commit is contained in:
Yaazkal
2021-07-23 05:42:04 -05:00
parent 116014d191
commit f9018047ea

View File

@@ -342,25 +342,25 @@ bootstrap_template() {
} }
check_linux_prerequisites() { check_linux_prerequisites() {
#check and install OS dependencies @hackacad #check and install OS dependencies @hackacad
if [ ! "$(sysrc -f /boot/loader.conf -n linprocfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n linsysfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n tmpfs_load)" = "YES" ]; then if [ ! "$(sysrc -f /boot/loader.conf -n linprocfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n linsysfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n tmpfs_load)" = "YES" ]; then
warn "linprocfs_load, linsysfs_load, tmpfs_load not enabled in /boot/loader.conf or linux_enable not active. Should I do that for you? (N|y)" warn "linprocfs_load, linsysfs_load, tmpfs_load not enabled in /boot/loader.conf or linux_enable not active. Should I do that for you? (N|y)"
read answer read answer
case $answer in case $answer in
[Nn][Oo]|[Nn]|"") [Nn][Oo]|[Nn]|"")
error_exit "Exiting." error_exit "Exiting."
;; ;;
[Yy][Ee][Ss]|[Yy]) [Yy][Ee][Ss]|[Yy])
info "Loading modules" info "Loading modules"
kldload linux linux64 linprocfs linsysfs tmpfs kldload linux linux64 linprocfs linsysfs tmpfs
info "Persisting modules" info "Persisting modules"
sysrc linux_enable=YES sysrc linux_enable=YES
sysrc -f /boot/loader.conf linprocfs_load=YES sysrc -f /boot/loader.conf linprocfs_load=YES
sysrc -f /boot/loader.conf linsysfs_load=YES sysrc -f /boot/loader.conf linsysfs_load=YES
sysrc -f /boot/loader.conf tmpfs_load=YES sysrc -f /boot/loader.conf tmpfs_load=YES
;; ;;
esac esac
fi fi
} }
HW_MACHINE=$(sysctl hw.machine | awk '{ print $2 }') HW_MACHINE=$(sysctl hw.machine | awk '{ print $2 }')