Tweak the uuid search setup
Not all arches may have a grub.cfg, it seems. Don't fail there.
This commit is contained in:
parent
d99baf29c5
commit
2ef9e57ec0
|
@ -257,8 +257,10 @@ change_grub_cfg_uuid () {
|
||||||
# reliable - see #1024346 and #1024720 for examples where this
|
# reliable - see #1024346 and #1024720 for examples where this
|
||||||
# fails. Instead, let's generate a UUID here and use that as a
|
# fails. Instead, let's generate a UUID here and use that as a
|
||||||
# flag file.
|
# flag file.
|
||||||
UUID=$(uuidgen)
|
if [ -f $CDDIR/EFI/debian/grub.cfg ]; then
|
||||||
mkdir -p $CDDIR/.disk/id
|
UUID=$(uuidgen)
|
||||||
touch $CDDIR/.disk/id/$UUID
|
mkdir -p $CDDIR/.disk/id
|
||||||
sed -i "/search --file --set=root/s,.disk/info,.disk/id/$UUID," $CDDIR/EFI/debian/grub.cfg
|
touch $CDDIR/.disk/id/$UUID
|
||||||
|
sed -i "/search --file --set=root/s,.disk/info,.disk/id/$UUID," $CDDIR/EFI/debian/grub.cfg
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,8 +231,10 @@ change_grub_cfg_uuid () {
|
||||||
# reliable - see #1024346 and #1024720 for examples where this
|
# reliable - see #1024346 and #1024720 for examples where this
|
||||||
# fails. Instead, let's generate a UUID here and use that as a
|
# fails. Instead, let's generate a UUID here and use that as a
|
||||||
# flag file.
|
# flag file.
|
||||||
UUID=$(uuidgen)
|
if [ -f $CDDIR/EFI/debian/grub.cfg ]; then
|
||||||
mkdir -p $CDDIR/.disk/id
|
UUID=$(uuidgen)
|
||||||
touch $CDDIR/.disk/id/$UUID
|
mkdir -p $CDDIR/.disk/id
|
||||||
sed -i "/search --file --set=root/s,.disk/info,.disk/id/$UUID," $CDDIR/EFI/debian/grub.cfg
|
touch $CDDIR/.disk/id/$UUID
|
||||||
|
sed -i "/search --file --set=root/s,.disk/info,.disk/id/$UUID," $CDDIR/EFI/debian/grub.cfg
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue