diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-20 23:15:17 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-20 23:15:17 +0200 |
commit | 174a6038d44468ca8e98f849024cdbb2ba7e2c01 (patch) | |
tree | 83c8d070c75b86c1da6642b99291ca6f5dd212cf /src/core | |
parent | 86d47cc4f61bd61f2f11dbc8e6075120f815ab71 (diff) | |
parent | 18901d93175fa5949532d80d64fd510a548582f1 (diff) |
Merge branch 'master' into experimental
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 2a1a839..812753e 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -890,10 +890,12 @@ EOF cp -a $var_TARGET_DIR/usr/lib/grub/i386-pc/* $var_TARGET_DIR/boot/grub/ sync # freeze xfs filesystems to enable grub installation on xfs filesystems - if [ -x /usr/sbin/xfs_freeze ]; then - /usr/sbin/xfs_freeze -f $var_TARGET_DIR/boot > /dev/null 2>&1 - /usr/sbin/xfs_freeze -f $var_TARGET_DIR/ > /dev/null 2>&1 - fi + for xfsdev in $(blkid -t TYPE=xfs -o device); do + mnt=$(mount | grep $xfsdev | cut -d' ' -f 3) + if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" ]; then + /usr/sbin/xfs_freeze -f $mnt > /dev/null 2>&1 + fi + done # look for a separately-mounted /boot partition bootpart=$(mount | grep $var_TARGET_DIR/boot | cut -d' ' -f 1) if [ "$bootpart" = "" ]; then @@ -926,10 +928,12 @@ quit EOF cat /tmp/grub.log >$LOG # unfreeze xfs filesystems - if [ -x /usr/sbin/xfs_freeze ]; then - /usr/sbin/xfs_freeze -u $var_TARGET_DIR/boot > /dev/null 2>&1 - /usr/sbin/xfs_freeze -u $var_TARGET_DIR/ > /dev/null 2>&1 - fi + for xfsdev in $(blkid -t TYPE=xfs -o device); do + mnt=$(mount | grep $xfsdev | cut -d' ' -f 3) + if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" ]; then + /usr/sbin/xfs_freeze -u $mnt > /dev/null 2>&1 + fi + done if grep "Error [0-9]*: " /tmp/grub.log >/dev/null; then notify "Error installing GRUB. (see $LOG for output)" |