bugGNU GRUB - Bugs: bug #35386, Add tests to grub-reboot

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35386: Add tests to grub-reboot

Submitted by:  Mike Bridge <buckethead>
Submitted on:  Fri 27 Jan 2012 10:39:07 PM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: Feature Request
Status: Wont FixPrivacy: Public
Assigned to: NoneOriginator Name: Mike Bridge
Open/Closed: ClosedRelease: 
Release: otherReproducibility: Every Time
Planned Release: None

Sun 04 Mar 2012 01:41:10 AM UTC, comment #1:

Even if kdm is installed it's not necessarily used. Erroring in one package just because some other package may be misconfigured is unreasonable. Also it may be that GRUB isn't the main bootloader even if grub-reboot is used. E.g. if you odify another system mounted somewhere or just test GRUB as secondary loader. Converserly grub-reboot may never be executed and so the check would never happen. It's just wrong place to check for kdm config.

Also grub.cfg may be manually written and contents of default/grub isn't significant in this case. Also if --boot-directory is given we have no idea where the corresponding default/grub may be. Again exiting with error just because of a sanity check which doesn't cover all possible usecases isn't good

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 27 Jan 2012 10:39:07 PM UTC, original submission:

Grub-reboot doesn't currently check sanity of configuration. I recommend checking for proper parameters in /etc/default/grub and (If KDM is installed) in /usr/share/kdm/kdmrc.

Something along the lines of the below ought to work.

#!/bin/bash
if ! grep -qi "GRUB_DEFAULT=saved" /etc/default/grub; then
echo "[ERROR] GRUB_DEFAULT=SAVED not found in /etc/default/grub"
fi

#KDM Integration
if [ -a /usr/share/config/kdm/kdmrc ]; then
if ! grep -qi "BootManager=Grub2" /usr/share/config/kdm/kdmrc; then
echo "[ERROR] BootManager is not set in /usr/share/config/kdm/kdmrc"
fi
fi

Mike Bridge <buckethead>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by buckethead (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Mar 2012 01:41:10 AM UTCphcoderStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1