wok-6.x annotate slitaz-boot-scripts/receipt @ rev 16

Add : slitaz-* receipts
author Christophe Lincoln <pankso@slitaz.org>
date Tue Dec 18 13:25:11 2007 +0100 (2007-12-18)
parents
children fa1dad350eb2
rev   line source
pankso@16 1 # SliTaz package receipt.
pankso@16 2
pankso@16 3 PACKAGE="slitaz-boot-scripts"
pankso@16 4 VERSION="1.2"
pankso@16 5 CATEGORY="base-files"
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@16 20 cp -a $src/etc $fs
pankso@16 21
pankso@16 22 # Perms
pankso@16 23 chown -R root.root $fs/etc/init.d
pankso@16 24 chmod 755 $fs/etc/init.d/*.sh
pankso@16 25 chmod 755 $fs/etc/init.d/rc*
pankso@16 26 }
pankso@16 27
pankso@16 28 # Pre install commands for upgrade from 1.2 to 1.3.
pankso@16 29 #
pankso@16 30 pre_install()
pankso@16 31 {
pankso@16 32 local root
pankso@16 33 root=$1
pankso@16 34 echo "Checking for version compatibility..."
pankso@16 35 if [ -d "$root/etc/rc.d" ]; then
pankso@16 36 rm -rf $root/etc/rc.d
pankso@16 37 rm -rf $root/etc/rc.scripts
pankso@16 38 fi
pankso@16 39 # Remove motd to be rebuils by /etc/init.d/i18n.sh in
pankso@16 40 # the right language.
pankso@16 41 rm -f $root/etc/motd
pankso@16 42
pankso@16 43 # Backup file to restore with post install
pankso@16 44 echo -n "Creating backups of configs..."
pankso@16 45 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak
pankso@16 46 cp $root/etc/network.conf $root/etc/network.conf.bak
pankso@16 47 cp $root/etc/inittab $root/etc/inittab.bak
pankso@16 48 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak
pankso@16 49 status
pankso@16 50 }
pankso@16 51
pankso@16 52 post_install()
pankso@16 53 {
pankso@16 54 local root
pankso@16 55 root=$1
pankso@16 56 echo -n "Restoring configs backups..."
pankso@16 57 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf
pankso@16 58 mv -f $root/etc/network.conf.bak $root/etc/network.conf
pankso@16 59 mv -f $root/etc/inittab.bak $root/etc/inittab
pankso@16 60 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh
pankso@16 61 status
pankso@16 62 }
pankso@16 63