Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Absolutely right. Although I would add a timeout at some point that throws an error.
    – Marki
    Commented Nov 3, 2013 at 14:29
  • @Alexis-Wilke This is almost perfect. How can I throw an error/timeout after say 30 retries?
    – fredrik
    Commented Nov 3, 2013 at 18:49
  • @fredrik: Count to thirty and stop when 30 has been reached.
    – Marki
    Commented Nov 3, 2013 at 19:38
  • Also, instead of using test -f you could use mountpoint -q to ensure the mountpoint is actually mounted, and that file hasn't somehow appears on the local filesystem.
    – fukawi2
    Commented Nov 4, 2013 at 5:54