projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cbf40a4
)
Execute blockdev to reread partition table; replace vol_id with blkid
author
Michael Prokop
<mika@grml.org>
Wed, 28 Oct 2009 21:43:48 +0000
(22:43 +0100)
committer
Michael Prokop
<mika@grml.org>
Wed, 28 Oct 2009 23:52:55 +0000
(
00:52
+0100)
grml-debootstrap
patch
|
blob
|
history
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
bf62ded
..
2d79d19
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-662,9
+662,19
@@
mkfs() {
if [ -n "$MKFS" ] ; then
einfo "Running $MKFS on $TARGET"
if [ -n "$MKFS" ] ; then
einfo "Running $MKFS on $TARGET"
- $MKFS $TARGET
- TARGET_UUID="$(vol_id -u $TARGET 2>/dev/null || echo '')"
- eend $?
+ $MKFS $TARGET ; RC=$?
+
+ # make sure /dev/disk/by-uuid/... is up2date, otherwise grub
+ # will fail to detect the uuid in the chroot
+ blockdev --rereadpt "${TARGET%%[0-9]*}"
+ # give the system 2 seconds, otherwise we might run into
+ # race conditions :-/
+ sleep 2
+
+ eval $(blkid -o udev $TARGET 2>/dev/null)
+ [ -n "$ID_FS_UUID" ] && TARGET_UUID="$ID_FS_UUID" || TARGET_UUID=""
+
+ eend $RC
fi
fi
fi
fi