From 10263f34147534db48390cfa78ef90ac5d2bcb29 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Tue, 21 Aug 2012 14:10:53 -0500
Subject: LinHES-config: mv_advanced  update splash/nosplash for grub config

---
 abs/core/LinHES-config/mv_advanced.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/abs/core/LinHES-config/mv_advanced.py b/abs/core/LinHES-config/mv_advanced.py
index fdcd1e2..e72b6bc 100755
--- a/abs/core/LinHES-config/mv_advanced.py
+++ b/abs/core/LinHES-config/mv_advanced.py
@@ -84,13 +84,20 @@ def setup_ncid_daemon(Runncidd):
 def setup_splash(Usebootsplash):
     if Usebootsplash == "1":
         logging.info("    Enabling splash")
-        cmd = ''' sed -i "s/^default.*0/default 1/g" /boot/grub/menu.lst'''
+        cmd = ''' sed -i "s/^set default.*$/set default="0"/g" /boot/grub/grub.cfg'''
+        mv_common.runcmd(cmd)
+        #this is needed in case grub-mkconfig is run
+        cmd = ''' sed -i "s/^GRUB_DEFAULT.*$/GRUB_DEFAULT="0"/g" /etc/default/grub'''
         mv_common.runcmd(cmd)
     else:
         logging.info("    Disabling splash")
-        cmd = ''' sed -i "s/^default.*1/default 0/g" /boot/grub/menu.lst'''
+        cmd = ''' sed -i "s/^set default.*$/set default="1"/g" /boot/grub/grub.cfg'''
+        mv_common.runcmd(cmd)
+        #this is needed in case grub-mkconfig is run
+        cmd = ''' sed -i "s/^GRUB_DEFAULT.*$/GRUB_DEFAULT="1"/g" /etc/default/grub'''
         mv_common.runcmd(cmd)
     return
+
 def setup_rrd(UseRRD):
     if UseRRD == "1":
         logging.info("    Enabling rrd_stats")
-- 
cgit v0.12

