diff options
Diffstat (limited to 'openswap.hook')
-rw-r--r-- | openswap.hook | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openswap.hook b/openswap.hook index 9aad79a29c2d..9a96ad4b3ced 100644 --- a/openswap.hook +++ b/openswap.hook @@ -1,7 +1,15 @@ run_hook () { ## read openswap configurations - source openswap.conf + source /openswap.conf + + ## Optional: To avoid race conditions + x=0; + while [ ! -b "$keyfile_device" ] && [ $x -le 10 ]; do + x=$((x+1)) + sleep .2 + done + ## End of optional if [ -z "$keyfile_device" ] || [ -z "$keyfile_filename" ] then |