File: postinst.mod

package info (click to toggle)
alsadriver 0.2.0-pre8-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,808 kB
  • ctags: 6,550
  • sloc: ansic: 43,490; sh: 916; makefile: 759; perl: 54
file content (44 lines) | stat: -rw-r--r-- 743 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
39
40
41
42
43
44
#!/bin/sh

set -e

case "$1" in
	configure)
		# continue as normal
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		exit 0;
	;;
	*)
		echo "postinst called with unknown argument \`$1'" >&2;
		exit 0;
	;;
esac

depmod -a

if [ -s /etc/modutils/alsa ]; then
	echo "It looks like you have already configured ALSA."
	echo "You can reconfigure alsa by running alsaconfig."
	echo ""
	/etc/init.d/alsa start
	exit 0
fi

echo -n "Would you like to configure ALSA now? (y/n) [y] "

read REPLY

if [ "$REPLY" = "n" -o "$REPLY" = "N" ]; then
	echo ""
	echo "Please run /usr/sbin/alsaconfig to configure ALSA at a later time.."  
	echo ""
	/etc/init.d/alsa start
	exit 0
fi

if /usr/sbin/alsaconfig ; then
	update-modules
	/etc/init.d/alsa start
fi