~ubuntu-core-dev/ubuntu-release-upgrader/trusty

« back to all changes in this revision

Viewing changes to DistUpgrade/zz-update-grub

  • Committer: Balint Reczey
  • Date: 2019-12-17 20:29:52 UTC
  • Revision ID: balint.reczey@canonical.com-20191217202952-ci93ah9xs51wnf0b
Moved to git at https://git.launchpad.net/ubuntu-release-upgrader

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
set -e
3
 
 
4
 
which update-grub >/dev/null 2>&1 || exit 0
5
 
 
6
 
set -- $DEB_MAINT_PARAMS
7
 
mode="${1#\'}"
8
 
mode="${mode%\'}"
9
 
case $0:$mode in
10
 
    # Only run on postinst configure and postrm remove, to avoid wasting
11
 
    # time by calling update-grub multiple times on upgrade and removal.
12
 
    # Also run if we have no DEB_MAINT_PARAMS, in order to work with old
13
 
    # kernel packages.
14
 
    */postinst.d/*:|*/postinst.d/*:configure|*/postrm.d/*:|*/postrm.d/*:remove)
15
 
        exec update-grub
16
 
        ;;
17
 
esac
18
 
 
19
 
exit 0