From e35ef729be24d37e617d0c41b2aa28133a9b0adc Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 27 Sep 2016 10:26:13 +0800 Subject: [PATCH] fix issue [FVT]: sed: can't read /boot/grub/grub.conf in servicenode log file #1730 --- xCAT-server/share/xcat/install/scripts/post.xcat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 6e573c979..4d50a85b7 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -434,8 +434,8 @@ EOF fi sed -i '/127.0.1.1/d' /etc/hosts else - sed -i 's/^serial/#serial/' /boot/grub/grub.conf - sed -i 's/^terminal/#terminal/' /boot/grub/grub.conf + [ -f /boot/grub/grub.conf ] && sed -i 's/^serial/#serial/' /boot/grub/grub.conf + [ -f /boot/grub/grub.conf ] && sed -i 's/^terminal/#terminal/' /boot/grub/grub.conf if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then msgutil_r "$MASTER_IP" "debug" "/boot/grub/grub.conf updated" "/var/log/xcat/xcat.log" fi