Bugfix to prevent double directory creation when bootstrapping Linux releases
This commit is contained in:
@@ -305,6 +305,7 @@ bootstrap_release() {
|
|||||||
debootstrap_release() {
|
debootstrap_release() {
|
||||||
|
|
||||||
# Make sure to check/bootstrap directories first.
|
# Make sure to check/bootstrap directories first.
|
||||||
|
RELEASE="${DIR_BOOTSTRAP}"
|
||||||
bootstrap_directories
|
bootstrap_directories
|
||||||
|
|
||||||
#check and install OS dependencies @hackacad
|
#check and install OS dependencies @hackacad
|
||||||
@@ -313,7 +314,8 @@ debootstrap_release() {
|
|||||||
required_mods="fdescfs linprocfs linsysfs tmpfs"
|
required_mods="fdescfs linprocfs linsysfs tmpfs"
|
||||||
linuxarc_mods="linux linux64"
|
linuxarc_mods="linux linux64"
|
||||||
for _req_kmod in ${required_mods}; do
|
for _req_kmod in ${required_mods}; do
|
||||||
if [ ! "$(sysrc -f /boot/loader.conf -qn ${_req_kmod}_load)" = "YES" ]; then
|
if [ ! "$(sysrc -f /boot/loader.conf -qn ${_req_kmod}_load)" = "YES" ] && \
|
||||||
|
[ ! "$(sysrc -f /boot/loader.conf.local -qn ${_req_kmod}_load)" = "YES" ]; then
|
||||||
warn "${_req_kmod} not enabled in /boot/loader.conf, Should I do that for you? (N|y)"
|
warn "${_req_kmod} not enabled in /boot/loader.conf, Should I do that for you? (N|y)"
|
||||||
read answer
|
read answer
|
||||||
case "${answer}" in
|
case "${answer}" in
|
||||||
@@ -346,7 +348,8 @@ debootstrap_release() {
|
|||||||
kldload -v ${_lin_kmod}
|
kldload -v ${_lin_kmod}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! "$(sysrc -qn linux_enable)" = "YES" ]; then
|
if [ ! "$(sysrc -qn linux_enable)" = "YES" ] && \
|
||||||
|
[ ! "$(sysrc -f /etc/rc.conf.local -qn linux_enable)" = "YES" ]; then
|
||||||
sysrc linux_enable=YES
|
sysrc linux_enable=YES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -363,17 +366,6 @@ debootstrap_release() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create subsequent Linux releases datasets
|
|
||||||
if [ ! -d "${bastille_releasesdir}/${DIR_BOOTSTRAP}" ]; then
|
|
||||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
|
||||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
|
||||||
zfs create ${bastille_zfs_options} -o mountpoint="${bastille_releasesdir}/${DIR_BOOTSTRAP}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/releases/${DIR_BOOTSTRAP}"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
mkdir -p "${bastille_releasesdir}/${DIR_BOOTSTRAP}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fetch the Linux flavor
|
# Fetch the Linux flavor
|
||||||
info "Bootstrapping ${PLATFORM_OS} distfiles..."
|
info "Bootstrapping ${PLATFORM_OS} distfiles..."
|
||||||
if ! debootstrap --foreign --arch=${ARCH_BOOTSTRAP} --no-check-gpg ${LINUX_FLAVOR} "${bastille_releasesdir}"/${DIR_BOOTSTRAP}; then
|
if ! debootstrap --foreign --arch=${ARCH_BOOTSTRAP} --no-check-gpg ${LINUX_FLAVOR} "${bastille_releasesdir}"/${DIR_BOOTSTRAP}; then
|
||||||
|
|||||||
Reference in New Issue
Block a user