bugGNU GRUB - Bugs: bug #31679, grub-mkconfig fails to add...

 
 

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

bug #31679: grub-mkconfig fails to add 40_custom correctly if last line has no line-feed

Submitted by:  Barry Jackson <barjac>
Submitted on:  Tue 16 Nov 2010 11:35:46 PM UTC  
 
Category: ConfigurationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: Barry Jackson
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: Every Time
Planned Release: None

Wed 17 Nov 2010 01:22:15 PM UTC, comment #2:

It may be invalid, but how is the average user to know that?
All I did was to stop typing without hitting return at the end of the last line.
This can be fixed with one "echo", so why leave it potentially broken?

--- grub/util/grub-mkconfig.in~ 2010-11-17 13:04:07.000000000 +0000
+++ grub/util/grub-mkconfig.in 2010-11-17 13:04:04.000000000 +0000
@@ -285,6 +285,7 @@
echo
echo "### BEGIN $i ###"
"$i"
+ echo
echo "### END $i ###"
fi
;;

Barry Jackson <barjac>
Wed 17 Nov 2010 07:22:35 AM UTC, comment #1:

configuration file without a \n at the end is invalid. 40_custom doesn't have to be able to parse invalid files.

Vladimir Serbinenko <phcoder>
Project Administrator
Tue 16 Nov 2010 11:35:46 PM UTC, original submission:

If the last line in 40_custom has no line-feed, then grub-mkconfig appends the 40_custom section footer to the end of the line breaking the command.

Example:-
set menu_color_highlight=yellow/blue### END /etc/grub.d/40_custom ###

Barry Jackson <barjac>

 

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 barjac (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
    Wed 17 Nov 2010 07:22:35 AM UTCphcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1