5 kx #!/bin/sh
5 kx
5 kx # arg 1: the new package version
5 kx pre_install() {
5 kx /bin/true
5 kx }
5 kx
5 kx # arg 1: the new package version
5 kx post_install() {
5 kx # Notice we use an absolute path below, rather than usr/bin/gdk-pixbuf-query-loaders-32.
5 kx # This is because we're testing to see if we are on the bootdisk, which will not have
5 kx # /usr/bin/gdk-pixbuf-query-loaders-32.
5 kx # Also we have to check that we are not in the installer mode on the target system
5 kx # ("/etc/system-installer"), and we have to be sure that we are on the working system
5 kx # on the target hardware ("proc/sys/kernel/osrelease" - relative path).
5 kx if [ -r proc/sys/kernel/osrelease -a ! -r /etc/system-installer -a -x /usr/bin/gdk-pixbuf-query-loaders-32 ]; then
5 kx /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache
5 kx fi
5 kx }
5 kx
5 kx # arg 1: the new package version
5 kx # arg 2: the old package version
5 kx pre_update() {
5 kx /bin/true
5 kx }
5 kx
5 kx # arg 1: the new package version
5 kx # arg 2: the old package version
5 kx post_update() {
5 kx post_install
5 kx }
5 kx
5 kx # arg 1: the old package version
5 kx pre_remove() {
5 kx /bin/true
5 kx }
5 kx
5 kx # arg 1: the old package version
5 kx post_remove() {
5 kx post_install
5 kx }
5 kx
5 kx
5 kx operation=$1
5 kx shift
5 kx
5 kx $operation $*