wok-stable view get-softmodem-driver/stuff/martian.receipt @ rev 3494

get-softmodem-driver: automatic country detection added during slmodem install
author Dominique Corbex <domcox@users.sourceforge.net>
date Thu Jun 18 14:43:23 2009 +0200 (2009-06-18)
parents e5ab27ad8b9e
children 07633a539a9d
line source
1 # SliTaz package receipt.
3 PACKAGE="martian"
4 VERSION="full-20080617"
5 CATEGORY="non-free"
6 SHORT_DESC="Driver for the Agere Systems PCI Modem built on DSP 164x (Mars) series."
7 MAINTAINER="domcox@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 DEPENDS="module-init-tools linux-source"
10 WEB_SITE="http://martian.barrelsoutofbond.org"
11 WGET_URL="http://www.barrelsoutofbond.org/downloads/$PACKAGE/$TARBALL"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
15 post_install()
16 {
17 # Country settings
18 if [ -e /etc/TZ ]; then
19 ZONE=`cat /etc/TZ`
20 CODE=`grep $ZONE /usr/share/softmodem/marszone.tab | cut -f1'`
21 if [ -n $CODE ]; then
22 COUNTRY=`grep ^$CODE /usr/share/softmodem/martian.country | cut -f2`
23 fi
24 fi
25 if [ -z $COUNTRY ]; then
26 COUNTRY="USA"
27 fi
28 cat >> $root/etc/daemons.conf << "EOT"
29 # martian daemon options.
30 MARTIAN_OPTIONS="--country=$COUNTRY"
32 EOT
33 # Load module
34 /sbin/depmod -a
35 /sbin/modprobe martian_dev && \
36 /etc/init.d/martian start
37 }