Break grub actions on the target system out into separate functions in
lib-software.sh and make sure we mount special filesystems (FS#29928).
Also fix a pathname bug causing grub errors to go undetected.
Signed-off-by: Thomas Hebb
---
src/core/libs/lib-blockdevices-filesystems.sh | 12 -----------
src/core/libs/lib-software.sh | 27 +++++++++++++++++++++++++
src/core/libs/lib-ui-interactive.sh | 14 +++++--------
3 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index 70805c8..1d101c5 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -346,18 +346,6 @@ dev_is_in_softraid_or_lvmpv () {
grep -qsw "${dev##*/}" /proc/mdstat || { pvscan -s 2>/dev/null | grep -q "$dev"; }
}
-
-# generate the grub device map, which is a translation table between grub devicenames and linux devicenames
-# hard disks get entries, but not their partitions
-get_grub_map() {
- inform "Generating GRUB device map...\nThis could take a while.\n\n Please be patient."
- chroot $var_TARGET_DIR grub --no-floppy --device-map /boot/grub/device.map &>$TMP_GRUB_LOG <$TMP_GRUB_LOG <$TMP_GRUB_LOG <$TMP_GRUB_LOG <$LOG
- if grep -q "Error [0-9]*: " $var_TARGET_DIR/$TMP_GRUB_LOG; then
+ target_grub_install "$bootpart" "$bootdev" "$boothd"
+
+ cat $TMP_GRUB_LOG >$LOG
+ if grep -q "Error [0-9]*: " $TMP_GRUB_LOG; then
notify "Error installing GRUB. (see $LOG for output)"
return 1
fi
--
1.7.10.2