wok-next view slitaz-boot-scripts/receipt @ rev 11669
inkscape: update deps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Feb 17 16:19:43 2012 +0100 (2012-02-17) |
parents | 5f09804913b2 |
children | 0521bd35c5db |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-boot-scripts"
4 VERSION="4.6"
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/init $fs
25 cp -a $src/applications $fs/usr/share
27 # Perms
28 chown -R root.root $fs
29 chmod 755 $fs/etc/init.d/*.sh
30 chmod 755 $fs/etc/init.d/rc*
31 chmod 755 $fs/init
32 }
34 # Pre install commands.
35 #
36 pre_install()
37 {
38 local root
39 root=$1
41 # Backup file to restore with post install
42 echo "Creating backups of configs..."
43 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak 2>/dev/null
44 cp $root/etc/network.conf $root/etc/network.conf.bak 2>/dev/null
45 cp $root/etc/inittab $root/etc/inittab.bak 2>/dev/null
46 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak 2>/dev/null
47 }
49 post_install()
50 {
51 local root
52 root=$1
53 echo "Restoring configs backups..."
54 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf 2>/dev/null
55 mv -f $root/etc/network.conf.bak $root/etc/network.conf 2>/dev/null
56 mv -f $root/etc/inittab.bak $root/etc/inittab 2>/dev/null
57 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh 2>/dev/null
59 # Fast boot X config from 3.0
60 if ! grep -q ^FAST_BOOT_X $root/etc/rcS.conf; then
61 cat >> $root/etc/rcS.conf << "EOT"
62 # Fast boot into X by setting the system keymap-locale and starting
63 # the Slim login manager earlier at boot time. If fast X is enabled
64 # then dbus, hald and slim can be removed from RUN_DAEMONS.
65 FAST_BOOT_X="no"
67 EOT
68 fi
69 # Fbsplash gui boot
70 if ! grep -q ^FBSPLASH $root/etc/rcS.conf; then
71 cat >> $root/etc/rcS.conf << "EOT"
72 # Graphical boot with fbsplash (To easily configure use: tazfbsplash)
73 FBSPLASH="no"
74 FBSPLASH_THEME="slitaz"
76 EOT
77 fi
79 # No more hwconf.sh and i18n.sh --> system.sh
80 sed -i s'/hwconf.sh/system.sh/' $root/etc/rcS.conf
81 sed -i s'/i18n.sh//' $root/etc/rcS.conf
83 # Remove old desktop file
84 rm -f /usr/share/applications/boot-log.desktop
85 }