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

Up e2fsprogs (1.44.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 04 18:42:23 2019 +0100 (2019-03-04)
parents b5a01d4afa99
children
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 # Fix loopfs case (thanks xjjx)
31 sed -i 's|.*to tmpfs.*|[ -d /mnt/etc ] \&\& launch_init\n&|' $fs/init
33 # Perms
34 chown -R root.root $fs
35 chmod 755 $fs/etc/init.d/*.sh
36 chmod 755 $fs/etc/init.d/rc*
37 chmod 755 $fs/init
38 }
40 # Pre install commands.
41 #
42 pre_install()
43 {
44 local root
45 root=$1
47 # Backup file to restore with post install
48 echo "Creating backups of configs..."
49 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak 2>/dev/null
50 cp $root/etc/network.conf $root/etc/network.conf.bak 2>/dev/null
51 cp $root/etc/inittab $root/etc/inittab.bak 2>/dev/null
52 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak 2>/dev/null
53 }
55 post_install()
56 {
57 local root
58 root=$1
59 echo "Restoring configs backups..."
60 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf 2>/dev/null
61 mv -f $root/etc/network.conf.bak $root/etc/network.conf 2>/dev/null
62 mv -f $root/etc/inittab.bak $root/etc/inittab 2>/dev/null
63 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh 2>/dev/null
65 # Fast boot X config from 3.0
66 if ! grep -q ^FAST_BOOT_X $root/etc/rcS.conf; then
67 cat >> $root/etc/rcS.conf << "EOT"
68 # Fast boot into X by setting the system keymap-locale and starting
69 # the Slim login manager earlier at boot time. If fast X is enabled
70 # then dbus, hald and slim can be removed from RUN_DAEMONS.
71 FAST_BOOT_X="no"
73 EOT
74 fi
75 # Fbsplash gui boot
76 if ! grep -q ^FBSPLASH $root/etc/rcS.conf; then
77 cat >> $root/etc/rcS.conf << "EOT"
78 # Graphical boot with fbsplash (To easily configure use: tazfbsplash)
79 FBSPLASH="no"
80 FBSPLASH_THEME="slitaz"
82 EOT
83 fi
85 # No more hwconf.sh and i18n.sh --> system.sh
86 sed -i s'/hwconf.sh/system.sh/' $root/etc/rcS.conf
87 sed -i s'/i18n.sh//' $root/etc/rcS.conf
89 # Remove old desktop file
90 rm -f /usr/share/applications/boot-log.desktop
91 }