diff options
author | Thomas Bächler <thomas@archlinux.org> | 2009-06-07 00:25:20 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2009-06-07 00:25:20 +0200 |
commit | 0e6bd9d12ca52650892ffa1b33ed2267c98a72d9 (patch) | |
tree | 9ca1796b894d3232c96829dfacc4fa9b76cbc5c5 /init_functions | |
parent | 1a26b2e49863cb3f010bc7b798fdbe3b8511ddfa (diff) | |
download | mkinitcpio-0e6bd9d12ca52650892ffa1b33ed2267c98a72d9.tar.gz mkinitcpio-0e6bd9d12ca52650892ffa1b33ed2267c98a72d9.tar.xz |
Don't only check for block devices, but also for symbolic links.
If we have a symlink, we don't check further if it points to a block device, partially due to klibc's readlink being broken.
Diffstat (limited to 'init_functions')
-rw-r--r-- | init_functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init_functions b/init_functions index cdc7a9f..0e501ca 100644 --- a/init_functions +++ b/init_functions @@ -15,9 +15,9 @@ poll_device() { seconds=5 fi echo "Waiting ${seconds} seconds for device ${device} ..." - while [ ! -b "${device}" -a ${seconds} -gt 0 ]; do + while [ ! -b "${device}" -a ! -L "${device}" -a ${seconds} -gt 0 ]; do sleep 1 seconds=$((${seconds}-1)) done - [ -b "${device}" ] + [ -b "${device}" -o -L "${device}" ] } |