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

Submitter:  Mike Bridge <buckethead>
Submitted:  Fri 27 Jan 2012 10:39:07 PM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Privacy:  Public
Assigned to:  None Originator Name:  Mike Bridge
Open/Closed:  Closed Release:  other
Release:  Reproducibility:  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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-04 phcoder StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code