wok annotate get-softmodem-driver/stuff/martian.receipt @ rev 22023
Remove cat process
| author | Pascal Bellard <pascal.bellard@slitaz.org> |
|---|---|
| date | Sun Oct 20 12:39:13 2019 +0200 (2019-10-20) |
| parents | |
| children |
| rev | line source |
|---|---|
| pascal@13591 | 1 # SliTaz package receipt. |
| pascal@13591 | 2 |
| pascal@13591 | 3 PACKAGE="martian" |
| pascal@13591 | 4 VERSION="full-20080617" |
| pascal@13591 | 5 CATEGORY="non-free" |
| pascal@13591 | 6 SHORT_DESC="Driver for the Agere Systems PCI Modem built on DSP 164x (Mars) series." |
| pascal@13591 | 7 MAINTAINER="domcox@slitaz.org" |
| pascal@13591 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
| pascal@13591 | 9 DEPENDS="module-init-tools linux-source" |
| pascal@13591 | 10 WEB_SITE="http://martian.barrelsoutofbond.org" |
| pascal@13591 | 11 WGET_URL="http://www.barrelsoutofbond.org/downloads/$PACKAGE/$TARBALL" |
| pascal@13591 | 12 |
| pascal@13591 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
| pascal@13591 | 14 |
| pascal@13591 | 15 post_install() |
| pascal@13591 | 16 { |
| pascal@13591 | 17 # Country settings |
| pascal@13591 | 18 if [ -e /etc/TZ ]; then |
| pascal@13591 | 19 ZONE=`cat /etc/TZ` |
| pascal@13591 | 20 CODE=`grep $ZONE /usr/share/martian/zone.tab | cut -f1'` |
| pascal@13591 | 21 if [ -n $CODE ]; then |
| pascal@13591 | 22 COUNTRY=`grep ^$CODE /usr/share/martian/martian.country | cut -f2` |
| pascal@13591 | 23 COUNTRY_NAME=`grep ^$CODE /usr/share/martian/martian.country | cut -f3` |
| pascal@13591 | 24 fi |
| pascal@13591 | 25 fi |
| pascal@13591 | 26 if [ -z $COUNTRY ]; then |
| pascal@13591 | 27 COUNTRY="us" |
| pascal@13591 | 28 COUNTRY_NAME="USA" |
| pascal@13591 | 29 fi |
| pascal@13591 | 30 echo "Automatic country setting: $COUNTRY_NAME" |
| pascal@13591 | 31 # Save options |
| pascal@13591 | 32 if [ `grep -c MARTIAN_OPTIONS /etc/daemons.conf` -gt 0 ]; then |
| pascal@13591 | 33 sed -i 's/MARTIAN_OPTIONS=.*/MARTIAN_OPTIONS="--country='"$COUNTRY"' \/dev\/ttySM0"/' /etc/daemons.conf |
| pascal@13591 | 34 else |
| pascal@13591 | 35 echo "# slmodemd daemon options." >> $root/etc/daemons.conf |
| pascal@13591 | 36 echo "MARTIAN_OPTIONS=\"--country=$COUNTRY /dev/ttySM0\"" >> $root/etc/daemons.conf |
| pascal@13591 | 37 echo >> $root/etc/daemons.conf |
| pascal@13591 | 38 fi |
| pascal@13591 | 39 # Load module |
| pascal@13591 | 40 /sbin/depmod -a |
| pascal@13591 | 41 /sbin/modprobe martian_dev && \ |
| pascal@13591 | 42 /etc/init.d/martian start |
| pascal@13591 | 43 } |
| pascal@13591 | 44 |
| pascal@13591 | 45 post_remove() |
| pascal@13591 | 46 { |
| pascal@13591 | 47 /etc/init.d/martian stop |
| pascal@13591 | 48 rm -rf /usr/share/martian |
| pascal@13591 | 49 } |