3 # Seconds to try to reread partition table
7 exec >"/tmp/${0##*/}.$$.out"
15 while sleep 1; test $cnt != 0; do
16 echo "Trying to reread partition table on $DEVNAME ($cnt)"
18 # If device node doesn't exist, it means the device was removed.
20 test -e "$DEVNAME" ||
{ echo "$DEVNAME doesn't exist, aborting"; exit 1; }
21 #echo "$DEVNAME exists"
22 if blockdev
--rereadpt "$DEVNAME"; then
23 echo "blockdev --rereadpt succeeded"
26 echo "blockdev --rereadpt failed, exit code: $?"