mirror of https://github.com/archzfs/archzfs
Merge pull request #223 from minextu/encryption-warning
Add encryption format change warningpull/216/merge
commit
824b8facb3
@ -1,23 +1,36 @@ |
||||
#!/bin/bash |
||||
|
||||
old_version="0.7.4-1" |
||||
systemd_old_version="0.7.4-1" |
||||
if [[ ${archzfs_package_group} =~ -git$ ]]; then |
||||
old_version="2017.12.08.r3208.4e9b15696-1" |
||||
systemd_old_version="2017.12.08.r3208.4e9b15696-1" |
||||
fi |
||||
|
||||
cat << EOF > ${zfs_utils_pkgbuild_path}/zfs-utils.install |
||||
systemd_warning=" |
||||
# If upgrading from $systemd_old_version or older |
||||
# display zfs-import warning |
||||
if [[ \$(vercmp \$2 $systemd_old_version) -le 0 ]]; then |
||||
echo '>>> WARNING: A new systemd unit file was added to archzfs!' |
||||
echo '>>> You may need enable zfs-import.target' |
||||
echo '>>> See https://github.com/archzfs/archzfs/issues/186' |
||||
fi" |
||||
|
||||
show_zfs_import_warning() { |
||||
echo ">>> WARNING: A new systemd unit file was added to archzfs!" |
||||
echo ">>> You may need enable zfs-import.target" |
||||
echo ">>> See https://github.com/archzfs/archzfs/issues/186" |
||||
} |
||||
|
||||
encryption_warning="" |
||||
if [[ ${archzfs_package_group} =~ -git$ ]]; then |
||||
encryption_old_version="2018.02.02.r3272.1b66810ba-1" |
||||
encryption_warning=" |
||||
# If upgrading from $encryption_old_version or older |
||||
# display encryption format change warning |
||||
if [[ \$(vercmp \$2 $encryption_old_version) -le 0 ]]; then |
||||
echo '>>> WARNING: The on-disk format for encrypted datasets has changed!' |
||||
echo '>>> All encrypted datasets will mount read only and need to be migrated.' |
||||
echo '>>> See https://github.com/archzfs/archzfs/issues/222' |
||||
fi" |
||||
fi |
||||
|
||||
|
||||
cat << EOF > ${zfs_utils_pkgbuild_path}/zfs-utils.install |
||||
post_upgrade() { |
||||
# If upgrading from $old_version or older |
||||
# display zfs-import warning |
||||
if [[ \$(vercmp \$2 $old_version) -le 0 ]]; then |
||||
show_zfs_import_warning |
||||
fi |
||||
${systemd_warning} |
||||
${encryption_warning} |
||||
} |
||||
EOF |
||||
|
Loading…
Reference in new issue