wok-stable view slitaz-boot-scripts/receipt @ rev 12254

Up: slitaz-configs (4.9.1) - Last minute bug fix
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 10 13:54:27 2012 +0200 (2012-04-10)
parents 9ffc10ecf210
children 176e5cd6fb16
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-boot-scripts"
4 VERSION="4.7.2"
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://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
11 CONFIG_FILES="/etc/inittab /etc/init.d/local.sh /etc/rcS.conf /etc/network.conf"
13 # Needed to fetch the keymaps and test the filesystem.
14 DEPENDS="kbd-base e2fsprogs"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 #
18 # This package is all build by genpkg, it provide the boot scripts found
19 # in /etc/init.d with the main config file : /etc/rcS.conf. It provide also
20 # the default inittab and the network config file used with network.sh
21 #
22 genpkg_rules()
23 {
24 mkdir -p $fs/usr/share $fs/etc/X11
25 cp -a $src/etc $fs
26 cp -a $src/bin $fs
27 cp -a $src/init $fs
28 cp -a $src/applications $fs/usr/share
30 # Perms
31 chown -R root.root $fs
32 chmod 755 $fs/etc/init.d/*.sh
33 chmod 755 $fs/etc/init.d/rc*
34 chmod 755 $fs/init
35 }
37 # Pre install commands.
38 #
39 pre_install()
40 {
41 local root
42 root=$1
44 # Backup file to restore with post install
45 echo "Creating backups of configs..."
46 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak 2>/dev/null
47 cp $root/etc/network.conf $root/etc/network.conf.bak 2>/dev/null
48 cp $root/etc/inittab $root/etc/inittab.bak 2>/dev/null
49 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak 2>/dev/null
50 }
52 post_install()
53 {
54 local root
55 root=$1
56 echo "Restoring configs backups..."
57 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf 2>/dev/null
58 mv -f $root/etc/network.conf.bak $root/etc/network.conf 2>/dev/null
59 mv -f $root/etc/inittab.bak $root/etc/inittab 2>/dev/null
60 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh 2>/dev/null
62 # Fast boot X config from 3.0
63 if ! grep -q ^FAST_BOOT_X $root/etc/rcS.conf; then
64 cat >> $root/etc/rcS.conf << "EOT"
65 # Fast boot into X by setting the system keymap-locale and starting
66 # the Slim login manager earlier at boot time. If fast X is enabled
67 # then dbus, hald and slim can be removed from RUN_DAEMONS.
68 FAST_BOOT_X="no"
70 EOT
71 fi
72 # Fbsplash gui boot
73 if ! grep -q ^FBSPLASH $root/etc/rcS.conf; then
74 cat >> $root/etc/rcS.conf << "EOT"
75 # Graphical boot with fbsplash (To easily configure use: tazfbsplash)
76 FBSPLASH="no"
77 FBSPLASH_THEME="slitaz"
79 EOT
80 fi
82 # No more hwconf.sh and i18n.sh --> system.sh
83 sed -i s'/hwconf.sh/system.sh/' $root/etc/rcS.conf
84 sed -i s'/i18n.sh//' $root/etc/rcS.conf
86 # Remove old desktop file
87 rm -f /usr/share/applications/boot-log.desktop
88 }