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

« back to all changes in this revision

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

  • 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
 
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#