mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 17:20:12 +01:00
bootstarp: Also check for dataset existence
This commit is contained in:
@@ -80,7 +80,9 @@ bootstrap_directories() {
|
|||||||
chmod 0750 "${bastille_prefix}"
|
chmod 0750 "${bastille_prefix}"
|
||||||
# Make sure the dataset is mounted in the proper place
|
# Make sure the dataset is mounted in the proper place
|
||||||
elif [ -d "${bastille_prefix}" ]; then
|
elif [ -d "${bastille_prefix}" ]; then
|
||||||
if [ "$(zfs get -H -o value mountpoint ${bastille_zfs_zpool}/${bastille_zfs_prefix})" != "${bastille_prefix}" ]; then
|
if ! zfs list "${bastille_zfs_zpool}/${bastille_zfs_prefix}" 2&>1; then
|
||||||
|
zfs create ${bastille_zfs_options} -o mountpoint="${bastille_prefix}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}"
|
||||||
|
elif [ "$(zfs get -H -o value mountpoint ${bastille_zfs_zpool}/${bastille_zfs_prefix})" != "${bastille_prefix}" ]; then
|
||||||
zfs set mountpoint="${bastille_prefix}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}"
|
zfs set mountpoint="${bastille_prefix}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user