diff options
Diffstat (limited to 'scripts/common.sh.in')
-rw-r--r-- | scripts/common.sh.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/common.sh.in b/scripts/common.sh.in index 29b85d3e1..3f63fc053 100644 --- a/scripts/common.sh.in +++ b/scripts/common.sh.in @@ -333,13 +333,14 @@ destroy_loop_devices() { } # -# Create a device label. +# Create a device label taking care to briefly wait if udev needs to settle. # label() { local DEVICE=$1 local LABEL=$2 - ${PARTED} ${DEVICE} --script -- mklabel ${LABEL} || return 1 + wait_udev ${DEVICE} 30 || return 1 + ${PARTED} ${DEVICE} --script -- mklabel ${LABEL} || return 2 return 0 } |