diff options
Diffstat (limited to 'encrypt4.hook')
-rw-r--r-- | encrypt4.hook | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/encrypt4.hook b/encrypt4.hook index 2e241ef..818e100 100644 --- a/encrypt4.hook +++ b/encrypt4.hook @@ -54,16 +54,27 @@ EOF echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead." } - for cryptopt in ${cryptoptions//,/ }; do + set -f + OLDIFS="$IFS"; IFS=, + for cryptopt in ${cryptoptions}; do case ${cryptopt} in - allow-discards) + allow-discards|discard) cryptargs="${cryptargs} --allow-discards" ;; + no-read-workqueue|perf-no_read_workqueue) + cryptargs="${cryptargs} --perf-no_read_workqueue" + ;; + no-write-workqueue|perf-no_read_workqueue) + cryptargs="${cryptargs} --perf-no_write_workqueue" + ;; *) echo "Encryption option '${cryptopt}' not known, ignoring." >&2 ;; esac done + set +f + IFS="$OLDIFS" + unset OLDIFS if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then |