diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-04-02 13:26:24 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-04-02 13:26:24 +0200 |
commit | 2df1c64f388576f113abd6f7a3696fa8bef58304 (patch) | |
tree | e92c06bdeda0ff96733fbad6767a91ab21247ca1 | |
parent | e306c1136787b0430592289347efab6098dae64e (diff) | |
download | busybox-w32-2df1c64f388576f113abd6f7a3696fa8bef58304.tar.gz busybox-w32-2df1c64f388576f113abd6f7a3696fa8bef58304.tar.bz2 busybox-w32-2df1c64f388576f113abd6f7a3696fa8bef58304.zip |
examples/mdev.conf.change_blockdev.sh: update
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | examples/mdev.conf.change_blockdev.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/mdev.conf.change_blockdev.sh b/examples/mdev.conf.change_blockdev.sh index a479a9630..512e43fcc 100755 --- a/examples/mdev.conf.change_blockdev.sh +++ b/examples/mdev.conf.change_blockdev.sh | |||
@@ -13,12 +13,17 @@ echo "Env:" | |||
13 | env | sort | 13 | env | sort |
14 | 14 | ||
15 | while sleep 1; test $cnt != 0; do | 15 | while sleep 1; test $cnt != 0; do |
16 | echo "Trying to rereat partition table on $DEVNAME ($cnt)" | 16 | echo "Trying to reread partition table on $DEVNAME ($cnt)" |
17 | : $((cnt--)) | 17 | : $((cnt--)) |
18 | # If device node doesn't exist, it means the device was removed. | ||
19 | # Stop trying. | ||
18 | test -e "$DEVNAME" || { echo "$DEVNAME doesn't exist, aborting"; exit 1; } | 20 | test -e "$DEVNAME" || { echo "$DEVNAME doesn't exist, aborting"; exit 1; } |
19 | #echo "$DEVNAME exists" | 21 | #echo "$DEVNAME exists" |
20 | blockdev --rereadpt "$DEVNAME" && break | 22 | if blockdev --rereadpt "$DEVNAME"; then |
23 | echo "blockdev --rereadpt succeeded" | ||
24 | exit 0 | ||
25 | fi | ||
21 | echo "blockdev --rereadpt failed, exit code: $?" | 26 | echo "blockdev --rereadpt failed, exit code: $?" |
22 | done | 27 | done |
23 | echo "blockdev --rereadpt succeeded" | 28 | echo "Timed out" |
24 | ) & | 29 | ) & |