diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index cf4f253ee..522a18e9b 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -440,8 +440,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