~psusi/ubuntu/saucy/grub2/fix-dmraid

« back to all changes in this revision

Viewing changes to debian/apport/source_grub2.py

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-01-03 11:40:44 UTC
  • mfrom: (17.6.31 experimental)
  • Revision ID: package-import@ubuntu.com-20130103114044-et8gar9lol415wc9
Tags: 2.00-10ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme and an appropriate background for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel option.
  - Bypass menu unless other OSes are installed or Shift is pressed.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Reduce visual clutter in normal mode.
  - Remove verbose messages printed before reading configuration.
  - Suppress kernel/initrd progress messages, except in recovery mode.
  - Show the boot menu if the previous boot failed.
  - Adjust upgrade version checks for Ubuntu.
  - Suppress "GRUB loading" message unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Check hardware support before using gfxpayload=keep.
  - Set vt.handoff=7 for smooth handoff to kernel graphical mode.
  - In recovery mode, add nomodeset to the Linux kernel arguments, and
    remove the 'set gfxpayload=keep' command.
  - Skip Windows os-prober entries on Wubi systems, and suppress the menu
    by default if those are the only other-OS entries.
  - Handle probing striped DM-RAID devices.
  - Replace 'single' by 'recovery' when friendly-recovery is installed.
  - Disable cursor as early as possible in grub_main.
  - Apply patch from Fedora to add a "linuxefi" loader.
  - Automatically call linuxefi from linux when necessary.
  - On amd64, add raw-uefi custom upload tarballs for signing.
  - Generate configuration for signed UEFI kernels if available.
  - Install signed images if UEFI Secure Boot is enabled.
  - Output a menu entry for firmware setup on UEFI FastBoot systems.
  - Stop using the /usr/share/images/desktop-base/desktop-grub.png
    alternative as the fallback background.
  - If the postinst is running in a container, skip grub-install and all
    its associated questions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
def check_shell_syntax(path):
21
21
    ''' Check the syntax of a shell script '''
22
22
    try:
23
 
        subprocess.check_call(['/bin/sh', '-n', path],
24
 
                              stderr=open(os.devnull,'w'))
 
23
        with open(os.devnull, 'w') as devnull:
 
24
            subprocess.check_call(['/bin/sh', '-n', path], stderr=devnull)
25
25
    except subprocess.CalledProcessError:
26
26
        return False
27
27
    return True
44
44
        # Unfortunately this test may involve executing code.  However, this
45
45
        # file is already sourced as root when running update-grub, so it
46
46
        # seems unlikely that this could do any further harm.
47
 
        subprocess.check_call(['/bin/sh', '-ec', '. %s' % re.escape(path)],
48
 
                              stderr=open(os.devnull,'w'))
 
47
        with open(os.devnull, 'w') as devnull:
 
48
            subprocess.check_call(
 
49
                ['/bin/sh', '-ec', '. %s' % re.escape(path)], stderr=devnull)
49
50
    except subprocess.CalledProcessError:
50
51
        return False
51
52
    return True