Public bug reported:

A behavior of grub-pc.config does not allow to reach "replacing config
file with new version", as shown below in a session listing:

# echo grub-pc grub2/linux_cmdline     string  acpi=force elevator=deadline | 
debconf-set-selections
# dpkg-reconfigure -f noninteractive grub-pc
Replacing config file /etc/default/grub with new version
Installation finished. No error reported.
Generating grub.cfg ...
...

The problematic code introduced in 
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/grub2/precise/revision/31/debian/grub-pc.config
 (lines 24-38)
(where it overwrites preseeded values in debconf database with call to db_set):

if test -e /etc/default/grub ; then                                             
                                                                                
                    
  . /etc/default/grub                                                           
                          

  db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"                              
                                                                                
                    
   db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"             
                                                                                
                     

   case grub-pc in                                                              
                                                                                
                     
   grub-pc)                                                                     
                                                                                
                   
      if [ "${GRUB_TIMEOUT}" != "" ]; then                                      
                                                                                
                    
        db_set grub-pc/timeout "$GRUB_TIMEOUT"                                  
                                                                                
                    
      fi                                                                        
                                                                                
                    
      if [ "${GRUB_HIDDEN_TIMEOUT}" != "" ]; then                               
                                                                                
                    
        db_set grub-pc/hidden_timeout true                                      
                                                                                
                    
      elif egrep -q '^#?[[:space:]]*GRUB_HIDDEN_TIMEOUT=' /etc/default/grub; 
then                                                                            
                       
        db_set grub-pc/hidden_timeout false                                     
                                                                                
                    
      fi                                                                        
                                                                                
                    
    ;;                                                                          
                                                                                
                    
  esac                                                                          
                                                                                
                    
fi

Commenting it out makes the above example in listing to work.

I dont understand the purpose to update debconf preseed values with those from 
config file.
 (assuming db has these already calibrated before adding into db with 
'interactive' backend)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: grub-pc 1.99-21ubuntu3.7
ProcVersionSignature: Ubuntu 3.2.0-35.55-generic 3.2.34
Uname: Linux 3.2.0-35-generic x86_64
ApportVersion: 2.0.1-0ubuntu17
Architecture: amd64
Date: Sat Dec 15 21:04:37 2012
MarkForUpload: True
ProcEnviron:
 LANGUAGE=ru_RU
 TERM=xterm
 PATH=(custom, user)
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug package-from-proposed precise third-party-packages

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1090768

Title:
  grub-pc.config prevents replacing with new config file contents

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1090768/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to