wok view slitaz-base-files/receipt @ rev 52

Modified slitaz-base-files + slitaz-boot-scripts to avoid errosr msg
author Christophe Lincoln <pankso@slitaz.org>
date Thu Dec 20 22:17:41 2007 +0100 (2007-12-20)
parents 5b9b4307925d
children e510cfe46815
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="1.0"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux tree and the necessary files for the base system."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.slitaz.org/"
10 WGET_URL="http://download.tuxfamily.org/slitaz/sources/base-files/$TARBALL"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 # Copy all rootfs from the stuff and set permissions.
16 cp -a $src/rootfs/* $fs
18 chown -R root.root $fs/*
19 chmod 1777 $fs/tmp
20 chmod 640 $fs/etc/shadow
21 chmod 640 $fs/etc/gshadow
23 # Populate /dev with /$fs/sbin/mktazdevs.sh.
24 ./$fs/sbin/mktazdevs.sh $fs/dev
26 # Creat /etc/mtab symlink.
27 cd $fs/etc
28 ln -s /proc/mounts mtab
29 }
31 # Pre and post install to backup all /etc/settings
32 #
33 pre_install()
34 {
35 local root
36 root=$1
37 echo "Creating backup of all files in /etc..."
38 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
39 }
41 post_install()
42 {
43 local root
44 root=$1
45 echo "Restoring files from /etc/etc.bak..."
46 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
47 rm -rf $root/tmp/etc.bak
49 # Remove old base-file pkg info
50 rm -rf $root/var/lib/tazpkg/installed/base-files
52 # Reset permission.
53 chmod 640 $root/etc/shadow
54 chmod 640 $root/etc/gshadow
56 if ! grep -q audio $root/etc/group; then
57 if [ -n "$root" ]; then
58 cp /etc/group $root/etc/group
59 else
60 addgroup -g 20 audio
61 fi
62 fi
64 # Add crond to daemons confi file
65 if ! grep -q CROND_OPTIONS $root/etc/daemons.conf; then
66 echo '# Cron daemon options.' >> $root/etc/daemons.conf
67 echo 'CROND_OPTIONS="-b"' >> $root/etc/daemons.conf
68 echo '' >> $root/etc/daemons.conf
69 fi
70 }
71 SELF_INSTALL=1