wok diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/slitaz-boot-scripts/receipt	Tue Dec 18 13:25:11 2007 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="slitaz-boot-scripts"
     1.7 +VERSION="1.2"
     1.8 +CATEGORY="base-files"
     1.9 +SHORT_DESC="Provide all the initialisation scripts used at boot time."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12 +WEB_SITE="http://www.slitaz.org/"
    1.13 +WGET_URL="http://download.tuxfamily.org/slitaz/sources/boot-scripts/$TARBALL"
    1.14 +
    1.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 +#
    1.17 +# This package is all build by genpkg, it provide the boot scripts found
    1.18 +# in /etc/init.d with the main config file : /etc/rcS.conf. It provide also
    1.19 +# the default inittab and the network config file used with network.sh
    1.20 +#
    1.21 +genpkg_rules()
    1.22 +{
    1.23 +	cp -a $src/etc $fs
    1.24 +	
    1.25 +	# Perms
    1.26 +	chown -R root.root $fs/etc/init.d
    1.27 +	chmod 755 $fs/etc/init.d/*.sh
    1.28 +	chmod 755 $fs/etc/init.d/rc*
    1.29 +}
    1.30 +
    1.31 +# Pre install commands for upgrade from 1.2 to 1.3.
    1.32 +#
    1.33 +pre_install()
    1.34 +{
    1.35 + 	local root
    1.36 + 	root=$1
    1.37 +	echo "Checking for version compatibility..."
    1.38 +	if [ -d "$root/etc/rc.d" ]; then
    1.39 +		rm -rf $root/etc/rc.d
    1.40 +		rm -rf $root/etc/rc.scripts
    1.41 +	fi
    1.42 +	# Remove motd to be rebuils by /etc/init.d/i18n.sh in
    1.43 +	# the right language.
    1.44 +	rm -f $root/etc/motd
    1.45 +	
    1.46 +	# Backup file to restore with post install
    1.47 +	echo -n "Creating backups of configs..."
    1.48 +	cp $root/etc/rcS.conf $root/etc/rcS.conf.bak
    1.49 +	cp $root/etc/network.conf $root/etc/network.conf.bak
    1.50 +	cp $root/etc/inittab $root/etc/inittab.bak
    1.51 +	cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak
    1.52 +	status
    1.53 +}
    1.54 +
    1.55 +post_install()
    1.56 +{
    1.57 + 	local root
    1.58 + 	root=$1
    1.59 +	echo -n "Restoring configs backups..."
    1.60 +	mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf
    1.61 +	mv -f $root/etc/network.conf.bak $root/etc/network.conf
    1.62 +	mv -f $root/etc/inittab.bak $root/etc/inittab
    1.63 +	mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh
    1.64 +	status
    1.65 +}
    1.66 +