File: preinst

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 (21 lines) | stat: -rw-r--r-- 577 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
#! /bin/sh

if [ ! -f /proc/pci -a ! -d /proc/bus/pci ]; then
	echo "I'm sorry, but to use ALSA you need a kernel with PCI-support"
	echo "enabled."
	echo
	echo -n "Press [enter] to continue "
	read HITME
fi

if [ -f /etc/modutils/alsa ]; then
	exit 0
fi

if grep -q '### BEGIN ALSA SETUP ###' /etc/conf.modules; then
	echo "I found an existing ALSA-configuration in /etc/conf.modules. I will"
	echo "extract that and move it to the new location (/etc/modutils/alsa)."

	sed -e '/### BEGIN ALSA SETUP ###/,\/### END ALSA SETUP ###/d' /etc/conf.modules > /etc/modutils/alsa
fi