On Fri, Jan 08, 2016 at 08:49:44AM +0100, Harald Dunkel wrote: > metoo. My /etc/crypttab contains just a comment line.
Indeed, the applied patch will loop infinitely when given an empty crypttab. Conversely, it will fail to loop if a busy entry is followed by a non-busy one. Here's a quick fix for both issues.
--- cryptdisks.functions.distrib 2016-01-06 20:35:05.000000000 -0500 +++ cryptdisks.functions 2016-01-08 11:08:58.367424334 -0500 @@ -772,15 +772,14 @@ ITERATE=1 while [ "$ITERATE" = "1" ]; do + ITERATE=0 egrep -v "^[[:space:]]*(#|$)" "$TABFILE" | while read dst src key opts; do handle_crypttab_line_stop "$dst" "$src" "$key" "$opts" <&3 STATE=$? if [ "$STATE" = "0" ]; then echo "stopped $dst" - ITERATE=0 elif [ "$STATE" = "1" ]; then log_action_end_msg $? - ITERATE=0 elif [ "$STATE" = "2" ]; then echo "$dst Busy. Retrying..." sleep 1