File: postinst

package info (click to toggle)
apmd 3.0beta5-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 244 kB
  • ctags: 106
  • sloc: ansic: 1,047; sh: 119; makefile: 109
file content (36 lines) | stat: -rwxr-xr-x 651 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
#
# This is the postinst script for the Debian GNU/Linux apmd package
#
# Written by Dirk Eddelbuettel <edd@debian.org>   

set -e 

if [ ! -e /proc/apm ]
then
    echo    ""
    echo -n "The apmd package requires kernel support which is missing "
    echo    "from the kernel"
    echo -n "that is currently running. You need to recompile your kernel "
    echo    "to use apmd."
    echo    ""
fi

case "$1" in
    configure)
	update-rc.d apmd defaults >/dev/null

	/etc/init.d/apmd start
	;;
    abort-upgrade|abort-remove|abort-deconfigure)
	exit 0
	;;
    *)
	echo "postinst called with unknown argument \`$1'" >&2
	exit 0
	;;
esac