~ubuntu-core-dev/ubuntu/raring/grub2/raring

« back to all changes in this revision

Viewing changes to debian/postinst.in

  • Committer: Colin Watson
  • Date: 2013-01-25 00:36:41 UTC
  • mfrom: (1892.1.773 2.00)
  • Revision ID: cjwatson@canonical.com-20130125003641-u64939ngp88usnlv
merge from Debian 2.00-12

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
  fi
296
296
}
297
297
 
 
298
running_in_container()
 
299
{
 
300
  type running-in-container >/dev/null 2>&1 && running-in-container >/dev/null
 
301
}
 
302
 
298
303
case "$1" in
299
304
  configure)
300
305
    . /usr/share/debconf/confmodule
452
457
            # We just hooked GRUB 2 in menu.lst; then also generate grub.cfg.
453
458
            touch /boot/grub/grub.cfg
454
459
          fi
455
 
        elif type running-in-container >/dev/null 2>&1 && \
456
 
             running-in-container; then
 
460
        elif running_in_container; then
457
461
          # Skip grub-install in containers.
458
462
          :
459
463
        elif test -z "$2" || test -e /boot/grub/core.img || \
698
702
    esac
699
703
 
700
704
    # If grub.cfg has been generated, update it.
701
 
    if test -e /boot/grub/grub.cfg ; then
 
705
    if test -e /boot/grub/grub.cfg && ! running_in_container; then
702
706
      update-grub 3>&-
703
707
    fi
704
708
  ;;