36 lines
1.1 KiB
Bash
36 lines
1.1 KiB
Bash
#!/bin/sh
|
|
# postinst script for ldaemon
|
|
|
|
#set -e
|
|
|
|
# summary of how this script can be called:
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
# <new-version>
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
# <failed-install-package> <version> `removing'
|
|
# <conflicting-package> <version>
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
# the debian-policy package
|
|
|
|
case "$1" in
|
|
configure)
|
|
# обновляем правила udev, чтобы разрешить доступ к крейтам по USB
|
|
if [ -x /sbin/udevadm ]; then
|
|
/sbin/udevadm control --reload-rules
|
|
/sbin/udevadm trigger --subsystem-match=usb --attr-match=idVendor=2a52 --attr-match=idProduct=e502
|
|
/sbin/udevadm trigger --subsystem-match=usb --attr-match=idVendor=2a52 --attr-match=idProduct=0e16
|
|
fi
|
|
;;
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|