wok-4.x annotate slitaz-boot-scripts/receipt @ rev 10930

Add linmodem-slmodem
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 20 22:16:05 2011 +0200 (2011-08-20)
parents 18381cd16c47
children 5f09804913b2
rev   line source
pankso@16 1 # SliTaz package receipt.
pankso@16 2
pankso@16 3 PACKAGE="slitaz-boot-scripts"
pankso@10857 4 VERSION="4.5"
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"
gokhlayeh@8012 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@16 9 WEB_SITE="http://www.slitaz.org/"
gokhlayeh@8012 10 WGET_URL="http://mirror.slitaz.org/sources/boot-scripts/$TARBALL"
pascal@1269 11 CONFIG_FILES="/etc/inittab /etc/init.d/local.sh /etc/rcS.conf /etc/network.conf"
pankso@16 12
pankso@16 13 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@16 14 #
pankso@16 15 # This package is all build by genpkg, it provide the boot scripts found
pankso@16 16 # in /etc/init.d with the main config file : /etc/rcS.conf. It provide also
pankso@16 17 # the default inittab and the network config file used with network.sh
pankso@16 18 #
pankso@16 19 genpkg_rules()
pankso@16 20 {
pankso@9874 21 mkdir -p $fs/usr/share $fs/etc/X11
pankso@16 22 cp -a $src/etc $fs
pankso@9875 23 cp -a $src/bin $fs
pankso@396 24 cp -a $src/applications $fs/usr/share
pankso@806 25
pankso@16 26 # Perms
pankso@2787 27 chown -R root.root $fs
pankso@16 28 chmod 755 $fs/etc/init.d/*.sh
pankso@16 29 chmod 755 $fs/etc/init.d/rc*
pankso@16 30 }
pankso@16 31
pankso@265 32 # Pre install commands.
pankso@16 33 #
pankso@16 34 pre_install()
pankso@16 35 {
pankso@16 36 local root
pankso@16 37 root=$1
pankso@806 38
pankso@16 39 # Backup file to restore with post install
pankso@52 40 echo "Creating backups of configs..."
pankso@52 41 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak 2>/dev/null
pankso@52 42 cp $root/etc/network.conf $root/etc/network.conf.bak 2>/dev/null
pankso@52 43 cp $root/etc/inittab $root/etc/inittab.bak 2>/dev/null
pankso@52 44 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak 2>/dev/null
pankso@16 45 }
pankso@16 46
pankso@16 47 post_install()
pankso@16 48 {
pankso@16 49 local root
pankso@16 50 root=$1
pankso@52 51 echo "Restoring configs backups..."
pankso@52 52 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf 2>/dev/null
pankso@52 53 mv -f $root/etc/network.conf.bak $root/etc/network.conf 2>/dev/null
pankso@52 54 mv -f $root/etc/inittab.bak $root/etc/inittab 2>/dev/null
pankso@52 55 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh 2>/dev/null
pankso@806 56
pankso@2787 57 # Fast boot X config from 3.0
pankso@2787 58 if ! grep -q ^FAST_BOOT_X $root/etc/rcS.conf; then
pankso@2787 59 cat >> $root/etc/rcS.conf << "EOT"
pankso@4018 60 # Fast boot into X by setting the system keymap-locale and starting
pankso@2787 61 # the Slim login manager earlier at boot time. If fast X is enabled
pankso@2787 62 # then dbus, hald and slim can be removed from RUN_DAEMONS.
pankso@2787 63 FAST_BOOT_X="no"
pankso@609 64
pankso@609 65 EOT
pascal@2792 66 fi
pankso@10717 67 # Fbsplash gui boot
pankso@10717 68 if ! grep -q ^FBSPLASH $root/etc/rcS.conf; then
pankso@10717 69 cat >> $root/etc/rcS.conf << "EOT"
pankso@10717 70 # Graphical boot with fbsplash (To easily configure use: tazfbsplash)
pankso@10717 71 FBSPLASH="no"
pankso@10717 72 FBSPLASH_THEME="slitaz"
pankso@10717 73
pankso@10717 74 EOT
pankso@10717 75 fi
pankso@10717 76
pankso@10717 77 # No more hwconf.sh and i18n.sh --> system.sh
pankso@10717 78 sed -i s'/hwconf.sh/system.sh/' $root/etc/rcS.conf
pankso@10717 79 sed -i s'/i18n.sh//' $root/etc/rcS.conf
pankso@10717 80
pankso@2791 81 # Remove old desktop file
pankso@2791 82 rm -f /usr/share/applications/boot-log.desktop
pankso@16 83 }
pascal@8932 84
pascal@8932 85 pre_remove()
pascal@8932 86 {
pascal@8932 87 # We can not remove this package !
pascal@8932 88 exit 1
pascal@8932 89 }