wok-4.x view slitaz-base-files/receipt @ rev 723

syslinux: cfg file use the right locale/keymap
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 02 22:44:24 2008 +0200 (2008-05-02)
parents 0ae3a5e4f21a
children be8d7caf2c51
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="2.1"
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 mkdir -p \
16 $fs/bin \
17 $fs/dev \
18 $fs/home \
19 $fs/media/cdrom \
20 $fs/media/flash \
21 $fs/media/usbdisk \
22 $fs/mnt \
23 $fs/proc \
24 $fs/root \
25 $fs/sbin \
26 $fs/sys \
27 $fs/tmp \
28 $fs/usr/bin \
29 $fs/usr/games \
30 $fs/usr/lib \
31 $fs/usr/local \
32 $fs/usr/sbin \
33 $fs/usr/share/doc \
34 $fs/var/cache \
35 $fs/var/games \
36 $fs/var/lib \
37 $fs/var/lock \
38 $fs/var/log \
39 $fs/var/run \
40 $fs/var/spool \
41 $fs/var/tmp
43 # Copy all rootfs from the stuff and set permissions.
44 cp -a $src/rootfs/* $fs
46 chown -R root.root $fs/*
47 chmod 1777 $fs/tmp
48 chmod 640 $fs/etc/shadow
49 chmod 640 $fs/etc/gshadow
50 chmod 0750 $fs/root
52 # Populate /dev with /$fs/sbin/mktazdevs.sh.
53 ./$fs/sbin/mktazdevs.sh $fs/dev
55 # Creat /etc/mtab symlink.
56 cd $fs/etc
57 ln -s /proc/mounts mtab
58 }
60 # Pre and post install to backup all /etc/settings
61 #
62 pre_install()
63 {
64 local root
65 root=$1
66 echo "Creating backup of all files in /etc..."
67 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
68 }
70 post_install()
71 {
72 local root
73 root=$1
74 echo "Restoring files from /etc/etc.bak..."
75 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
76 rm -rf $root/tmp/etc.bak
78 # Reset permission.
79 chmod 640 $root/etc/shadow
80 chmod 640 $root/etc/gshadow
82 if ! grep -q audio $root/etc/group; then
83 if [ -n "$root" ]; then
84 cp /etc/group $root/etc/group
85 else
86 addgroup -g 20 audio
87 fi
88 fi
90 # daemons.conf (tftp + dnsd)
91 if ! grep -q ^TFTPD_OPTIONS $root/etc/daemons.conf; then
92 echo '# Tftp daemon options.' >> $root/etc/daemons.conf
93 echo 'TFTPD_OPTIONS="-r /boot"' >> $root/etc/daemons.conf
94 echo '' >> $root/etc/daemons.conf
95 fi
96 if ! grep -q ^DNSD_OPTIONS $root/etc/daemons.conf; then
97 echo '# Domain name server options.' >> $root/etc/daemons.conf
98 echo 'DNSD_OPTIONS="-d"' >> $root/etc/daemons.conf
99 echo '' >> $root/etc/daemons.conf
100 fi
101 }
102 SELF_INSTALL=1