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