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

« back to all changes in this revision

Viewing changes to debian/update-notifier-common.postinst

  • Committer: Iain Lane
  • Date: 2019-08-01 12:34:01 UTC
  • Revision ID: iain.lane@canonical.com-20190801123401-dd5pfj314b3t55hk
Make livepatch_get_num_fixes (private API) return 'ssize_t' instead of
'gssize', which will allow us to use the '%zd' format string to print its
value. That in turn allows the string to be extracted into the .pot file
for translation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
# fixup /var/crash permissions (#449739)
 
6
if [ "$1" = configure ] && dpkg --compare-versions "$2" le-nl "0.89"; then
 
7
    if [ -d /var/crash ] && [ "$(stat -L -c '%a' /var/crash)" = "755" ]; then
 
8
        chmod 1777 /var/crash
 
9
    fi
 
10
fi
 
11
 
 
12
if [ "$1" = triggered ]; then
 
13
        for trigger in $2; do
 
14
                case $trigger in
 
15
                        /usr/share/package-data-downloads)
 
16
                                /usr/lib/update-notifier/package-data-downloader
 
17
                                ;;
 
18
                esac
 
19
        done
 
20
        exit 0
 
21
fi
 
22
 
 
23
# Ensure permissions are correct, otherwise downloading sandboxing fails
 
24
chown -R _apt:root /var/lib/update-notifier/package-data-downloads/partial/
 
25
chmod 700 /var/lib/update-notifier/package-data-downloads/partial/
 
26
 
 
27
# Run this when configuring as well, since we may not be triggered at all
 
28
# depending on package unpack order.
 
29
/usr/lib/update-notifier/package-data-downloader
 
30
 
 
31
# Remove update-motd cpu-checker script
 
32
dpkg-maintscript-helper rm_conffile /etc/update-motd.d/20-cpu-checker \
 
33
        0.110.1ubuntu1 -- "$@"
 
34
 
 
35
#DEBHELPER#