wok-current annotate slitaz-boot-scripts/receipt @ rev 806
Up: slitaz-boot-scripts (2.3) - Improved wifi and misc fixes
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 16 01:13:08 2008 +0200 (2008-05-16) |
parents | 178da4e0c9d6 |
children | 14b8cd9b18d0 |
rev | line source |
---|---|
pankso@16 | 1 # SliTaz package receipt. |
pankso@16 | 2 |
pankso@16 | 3 PACKAGE="slitaz-boot-scripts" |
pankso@806 | 4 VERSION="2.3" |
pankso@178 | 5 CATEGORY="base-system" |
pankso@16 | 6 SHORT_DESC="Provide all the initialisation scripts used at boot time." |
pankso@16 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@16 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@16 | 9 WEB_SITE="http://www.slitaz.org/" |
pankso@16 | 10 WGET_URL="http://download.tuxfamily.org/slitaz/sources/boot-scripts/$TARBALL" |
pankso@16 | 11 |
pankso@16 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16 | 13 # |
pankso@16 | 14 # This package is all build by genpkg, it provide the boot scripts found |
pankso@16 | 15 # in /etc/init.d with the main config file : /etc/rcS.conf. It provide also |
pankso@16 | 16 # the default inittab and the network config file used with network.sh |
pankso@16 | 17 # |
pankso@16 | 18 genpkg_rules() |
pankso@16 | 19 { |
pankso@396 | 20 mkdir -p $fs/usr/share |
pankso@16 | 21 cp -a $src/etc $fs |
pankso@396 | 22 cp -a $src/applications $fs/usr/share |
pankso@806 | 23 |
pankso@16 | 24 # Perms |
pankso@16 | 25 chown -R root.root $fs/etc/init.d |
pankso@16 | 26 chmod 755 $fs/etc/init.d/*.sh |
pankso@16 | 27 chmod 755 $fs/etc/init.d/rc* |
pankso@16 | 28 } |
pankso@16 | 29 |
pankso@265 | 30 # Pre install commands. |
pankso@16 | 31 # |
pankso@16 | 32 pre_install() |
pankso@16 | 33 { |
pankso@16 | 34 local root |
pankso@16 | 35 root=$1 |
pankso@806 | 36 |
pankso@16 | 37 # Backup file to restore with post install |
pankso@52 | 38 echo "Creating backups of configs..." |
pankso@52 | 39 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak 2>/dev/null |
pankso@52 | 40 cp $root/etc/network.conf $root/etc/network.conf.bak 2>/dev/null |
pankso@52 | 41 cp $root/etc/inittab $root/etc/inittab.bak 2>/dev/null |
pankso@52 | 42 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak 2>/dev/null |
pankso@16 | 43 } |
pankso@16 | 44 |
pankso@16 | 45 post_install() |
pankso@16 | 46 { |
pankso@16 | 47 local root |
pankso@16 | 48 root=$1 |
pankso@52 | 49 echo "Restoring configs backups..." |
pankso@52 | 50 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf 2>/dev/null |
pankso@52 | 51 mv -f $root/etc/network.conf.bak $root/etc/network.conf 2>/dev/null |
pankso@52 | 52 mv -f $root/etc/inittab.bak $root/etc/inittab 2>/dev/null |
pankso@52 | 53 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh 2>/dev/null |
pankso@806 | 54 |
pankso@609 | 55 # wifi config |
pankso@609 | 56 if ! grep -q ^WIFI $root/etc/network.conf; then |
pankso@609 | 57 cat >> $root/etc/network.conf << "EOT" |
pankso@609 | 58 # Wifi connection. |
pankso@609 | 59 # Enable/disable wireless connection at boot time. |
pankso@609 | 60 WIFI="no" |
pankso@609 | 61 |
pankso@609 | 62 # Wifi interface (iwconfig) and ESSID. |
pankso@609 | 63 WIFI_INTERFACE="wlan0" |
pankso@806 | 64 WIFI_ESSID="any" |
pankso@806 | 65 WIFI_MODE="managed" |
pankso@806 | 66 WIFI_KEY="" |
pankso@806 | 67 WIFI_CHANNEL="" |
pankso@609 | 68 |
pankso@609 | 69 EOT |
pankso@609 | 70 fi |
pankso@16 | 71 } |
pankso@16 | 72 |