mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-02 10:49:48 +01:00
setup: Don't need migratedir
This commit is contained in:
@@ -46,16 +46,6 @@ configure_filesystem() {
|
||||
# This is so we dont have to introduce breaking
|
||||
# changes on new variables added to bastille.conf
|
||||
|
||||
# Ensure migrate directory is in place
|
||||
## ${bastille_migratedir}
|
||||
if [ -z "${bastille_migratedir}" ]; then
|
||||
if ! grep -oq "bastille_migratedir=" "${BASTILLE_CONFIG}"; then
|
||||
sed -i '' 's|bastille_backupsdir=.*|&\nbastille_migratedir=\"${bastille_prefix}/migrate\" ## default: \"${bastille_prefix}/migrate\"|' ${BASTILLE_CONFIG}
|
||||
# shellcheck disable=SC1090
|
||||
. ${BASTILLE_CONFIG}
|
||||
fi
|
||||
fi
|
||||
|
||||
## ${bastille_prefix}
|
||||
if [ ! -d "${bastille_prefix}" ]; then
|
||||
if checkyesno bastille_zfs_enable; then
|
||||
@@ -87,23 +77,6 @@ configure_filesystem() {
|
||||
chmod 0750 "${bastille_backupsdir}"
|
||||
fi
|
||||
|
||||
## ${bastille_migratedir}
|
||||
if [ ! -d "${bastille_migratedir}" ]; then
|
||||
if checkyesno bastille_zfs_enable; then
|
||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
||||
zfs create ${bastille_zfs_options} -o mountpoint="${bastille_migratedir}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/migrate"
|
||||
fi
|
||||
else
|
||||
mkdir -p "${bastille_migratedir}"
|
||||
fi
|
||||
chmod 777 "${bastille_migratedir}"
|
||||
fi
|
||||
|
||||
# Migrate needs 777
|
||||
if [ "$(stat -f %Lp ${bastille_migratedir})" -ne "777" ]; then
|
||||
chmod 777 "${bastille_migratedir}"
|
||||
fi
|
||||
|
||||
## ${bastille_cachedir}
|
||||
if [ ! -d "${bastille_cachedir}" ]; then
|
||||
if checkyesno bastille_zfs_enable; then
|
||||
@@ -443,4 +416,4 @@ case "$1" in
|
||||
*)
|
||||
error_exit "[ERROR]: Unknown option: \"${1}\""
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user