Ubuntu Focal support

incl. minor fixes
This commit is contained in:
Bike Dude
2021-02-10 14:33:04 +01:00
parent 0b80c59744
commit 056b0237ad
2 changed files with 51 additions and 3 deletions
+40
View File
@@ -462,12 +462,52 @@ ubuntu_bionic|bionic|ubuntu-bionic)
;;
esac
fi
echo "APT::Cache-Start 251658240;" > ${bastille_releasesdir}/Ubuntu_1804/etc/apt/apt.conf.d/00aptitude
;;
ubuntu_focal|focal|ubuntu-focal)
#check and install OS dependencies @hackacad
#ToDo: add function 'linux_pre' for sysrc etc.
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)"
read answer
case $answer in
no|No|n|N|"")
error_exit "Exiting."
;;
yes|Yes|y|Y)
info "Loading modules"
kldload linux linux64 linprocfs linsysfs tmpfs
info "Persisting modules"
sysrc linux_enable=YES
sysrc -f /boot/loader.conf linprocfs_load=YES
sysrc -f /boot/loader.conf linsysfs_load=YES
sysrc -f /boot/loader.conf tmpfs_load=YES
;;
esac
fi
if which -s debootstrap; then
debootstrap --foreign --arch=amd64 --no-check-gpg focal ${bastille_releasesdir}/Ubuntu_2004
else
warn "Debootstrap not found. Should it be installed? (N|y)"
read answer
case $answer in
no|No|n|N|"")
error_exit "Exiting. You need to install debootstap before boostrapping a Linux jail."
;;
yes|Yes|y|Y)
pkg install debootstrap -y
debootstrap --foreign --arch=amd64 --no-check-gpg focal ${bastille_releasesdir}/Ubuntu_2004
;;
esac
fi
;;
*)
usage
;;
esac
case "${OPTION}" in
update)
bastille update "${RELEASE}"