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

« back to all changes in this revision

Viewing changes to debian/update-notifier-hp-firmware.conf

  • 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
 
description "Update notification regarding HP firmware installation"
2
 
author "Brian Murray <brian@ubuntu.com>"
3
 
 
4
 
# only idVendor=03f0, idProduct="??{17,2a}" requires firmware
5
 
start on (
6
 
    :sys:usb-device-added ID_VENDOR_ID=03f0 ID_MODEL_ID=??17 or
7
 
    :sys:usb-device-added ID_VENDOR_ID=03f0 ID_MODEL_ID=??2a or
8
 
    usb-device-added ID_VENDOR_ID=03f0 ID_MODEL_ID=??17 or
9
 
    usb-device-added ID_VENDOR_ID=03f0 ID_MODEL_ID=??2a
10
 
)
11
 
 
12
 
script
13
 
test -f /usr/bin/hp-mkuri || exit 0
14
 
DATE=$(date)
15
 
RESULT=0
16
 
hp_model="$ID_MODEL" /usr/bin/hp-mkuri -c || RESULT=$?
17
 
echo "$DATE hp-mkuri returned $RESULT"
18
 
# firmware is required if a 2 or a 5 is returned
19
 
if [ $RESULT -eq 2 ] || [ $RESULT -eq 5 ]; then
20
 
  /usr/bin/hp-plugin-ubuntu
21
 
fi
22
 
end script