File: postinst

package info (click to toggle)
apmd 3.0final-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 688 kB
  • ctags: 641
  • sloc: ansic: 2,617; makefile: 567; sh: 240
file content (38 lines) | stat: -rwxr-xr-x 664 bytes parent folder | download
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
37
38
#!/bin/sh
#
# This is the postinst script for the Debian GNU/Linux apmd package
#
# Written by Dirk Eddelbuettel <edd@debian.org>   

#DEBHELPER#

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