Destroy ZFS dataset before rename

This commit is contained in:
Jose
2019-11-22 07:44:10 -04:00
parent 13f1739f96
commit cbd40d2d85
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -604,8 +604,8 @@ zfs_activate()
zfs create ${bastille_zfs_options} ${bastille_zfs_zpool}/${bastille_zfs_prefix}
if [ $? -ne 0 ]; then
echo "Failed to enable ZFS, reverting changes."
mv ${CWDIR}.old ${CWDIR}
zfs destroy ${bastille_zfs_zpool}/${bastille_zfs_prefix}
mv ${CWDIR}.old ${CWDIR}
else
echo "Synchronizing '${BASTILLE_DIR}' data on new dataset"
rsync -a ${CWDIR}.old/ ${CWDIR}/