projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5a873a8
)
Abort if FIXED_DISK_IDENTIFIERS is set but mkfs.* does not match for ext{2,3,4} file...
author
Michael Prokop
<mika@grml.org>
Fri, 7 Mar 2014 23:52:28 +0000
(
00:52
+0100)
committer
Michael Prokop
<mika@grml.org>
Fri, 7 Mar 2014 23:52:36 +0000
(
00:52
+0100)
grml-debootstrap
patch
|
blob
|
history
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
fd63e7d
..
9cd82a7
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-889,9
+889,15
@@
mkfs() {
$MKFS $TARGET ; RC=$?
if [ "$FIXED_DISK_IDENTIFIERS" = "yes" ] ; then
$MKFS $TARGET ; RC=$?
if [ "$FIXED_DISK_IDENTIFIERS" = "yes" ] ; then
- einfo "Changing disk uuid for $TARGET to fixed (non-random) value using tune2fs"
- tune2fs "$TARGET" -U 26ada0c0-1165-4098-884d-aafd2220c2c6
- eend $?
+ if ! echo "$MKFS" | grep -q "mkfs.ext" ; then
+ eerror "Not changing disk uuid for $TARGET because $MKFS doesn't seem to match for ext{2,3,4} file system"
+ eend 1
+ bailout 1
+ else
+ einfo "Changing disk uuid for $TARGET to fixed (non-random) value using tune2fs"
+ tune2fs "$TARGET" -U 26ada0c0-1165-4098-884d-aafd2220c2c6
+ eend $?
+ fi
fi
# make sure /dev/disk/by-uuid/... is up2date, otherwise grub
fi
# make sure /dev/disk/by-uuid/... is up2date, otherwise grub