~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to data/notify-reboot-required

  • Committer: Balint Reczey
  • Date: 2020-06-11 18:46:02 UTC
  • Revision ID: balint.reczey@canonical.com-20200611184602-2rv1zan3xu723x2u
Moved to git at https://git.launchpad.net/update-notifier

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# we do not include ". gettext.sh" here because:
4
 
# a) it breaks if its not available
5
 
# b) the string we have here does not need it (because it has no vars)
6
 
eval_gettext() {
7
 
    if [ -x /usr/bin/gettext ]; then
8
 
        echo $(gettext "$1")
9
 
    else
10
 
        echo "$1"
11
 
    fi
12
 
}
13
 
export TEXTDOMAIN=update-notifier
14
 
export TEXTDOMAINDIR=/usr/share/locale
15
 
 
16
 
case "$DPKG_MAINTSCRIPT_PACKAGE::$DPKG_MAINTSCRIPT_NAME" in
17
 
    linux-image-extra*::postrm)
18
 
        exit 0;;
19
 
esac
20
 
 
21
 
if [ "$0" = "/etc/kernel/postinst.d/update-notifier" ]; then
22
 
    DPKG_MAINTSCRIPT_PACKAGE=linux-base
23
 
fi
24
 
 
25
 
# Wake the applet up
26
 
echo "*** $(eval_gettext "System restart required") ***" > /var/run/reboot-required
27
 
echo "$DPKG_MAINTSCRIPT_PACKAGE" >> /var/run/reboot-required.pkgs