diff options
author | Archzfs Buildbot | 2018-11-26 21:46:41 +0000 |
---|---|---|
committer | Archzfs Buildbot | 2018-11-26 21:46:41 +0000 |
commit | d318096571a7170fce8029a3b8a477203e40206c (patch) | |
tree | 70aff1992607b66ed21266cd4643d3a4b6b7d1e5 /zfs-utils.initcpio.hook | |
parent | 9ab101ffeba76bd571489528e0836d20b066706f (diff) | |
download | aur-d318096571a7170fce8029a3b8a477203e40206c.tar.gz |
Semi-automated update for latest git commit
Diffstat (limited to 'zfs-utils.initcpio.hook')
-rw-r--r-- | zfs-utils.initcpio.hook | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/zfs-utils.initcpio.hook b/zfs-utils.initcpio.hook index b47cc2849c9e..b75d2fa17961 100644 --- a/zfs-utils.initcpio.hook +++ b/zfs-utils.initcpio.hook @@ -91,25 +91,22 @@ zfs_mount_handler () { # Mount the root, and any child datasets for dataset in ${zfs_datasets}; do mountpoint=$(zfs get -H -o value mountpoint "${dataset}") - case ${mountpoint} in - "none") - # skip this line/dataset. - ;; - "legacy") - if [ -f "${tab_file}" ]; then - if findmnt -snero source -F "${tab_file}" -S "${dataset}" > /dev/null 2>&1; then - opt=$(findmnt -snero options -F "${tab_file}" -S "${dataset}") - mnt=$(findmnt -snero target -F "${tab_file}" -S "${dataset}") - zfs_decrypt_fs "${dataset}" - mount -t zfs -o "${opt}" "${dataset}" "${node}${mnt}" - fi + canmount=$(zfs get -H -o value canmount "${dataset}") + # skip dataset + [ ${canmount} = "off" -o ${mountpoint} = "none" ] && continue + if [ ${mountpoint} = "legacy" ]; then + if [ -f "${tab_file}" ]; then + if findmnt -snero source -F "${tab_file}" -S "${dataset}" > /dev/null 2>&1; then + opt=$(findmnt -snero options -F "${tab_file}" -S "${dataset}") + mnt=$(findmnt -snero target -F "${tab_file}" -S "${dataset}") + zfs_decrypt_fs "${dataset}" + mount -t zfs -o "${opt}" "${dataset}" "${node}${mnt}" fi - ;; - *) - zfs_decrypt_fs "${dataset}" - mount -t zfs -o "zfsutil,${rwopt_exp}" "${dataset}" "${node}/${mountpoint##${rootmnt}}" - ;; - esac + fi + else + zfs_decrypt_fs "${dataset}" + mount -t zfs -o "zfsutil,${rwopt_exp}" "${dataset}" "${node}/${mountpoint##${rootmnt}}" + fi done } |