wok-stable annotate slitaz-boot-scripts/receipt @ rev 12409
aria2: update deps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 22 21:23:03 2013 +0000 (2013-11-22) |
parents | b5a01d4afa99 |
children |
rev | line source |
---|---|
pankso@16 | 1 # SliTaz package receipt. |
pankso@16 | 2 |
pankso@16 | 3 PACKAGE="slitaz-boot-scripts" |
pascal@12224 | 4 VERSION="4.7.2" |
pankso@178 | 5 CATEGORY="base-system" |
pankso@16 | 6 SHORT_DESC="Provide all the initialisation scripts used at boot time." |
pankso@16 | 7 MAINTAINER="pankso@slitaz.org" |
gokhlayeh@8012 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@16 | 9 WEB_SITE="http://www.slitaz.org/" |
pascal@12224 | 10 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz" |
pascal@1269 | 11 CONFIG_FILES="/etc/inittab /etc/init.d/local.sh /etc/rcS.conf /etc/network.conf" |
pankso@16 | 12 |
pankso@12161 | 13 # Needed to fetch the keymaps and test the filesystem. |
pankso@12161 | 14 DEPENDS="kbd-base e2fsprogs" |
pankso@12161 | 15 |
pankso@16 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16 | 17 # |
pankso@16 | 18 # This package is all build by genpkg, it provide the boot scripts found |
pankso@16 | 19 # in /etc/init.d with the main config file : /etc/rcS.conf. It provide also |
pankso@16 | 20 # the default inittab and the network config file used with network.sh |
pankso@16 | 21 # |
pankso@16 | 22 genpkg_rules() |
pankso@16 | 23 { |
pankso@9874 | 24 mkdir -p $fs/usr/share $fs/etc/X11 |
pankso@16 | 25 cp -a $src/etc $fs |
pankso@9875 | 26 cp -a $src/bin $fs |
pascal@11620 | 27 cp -a $src/init $fs |
pankso@396 | 28 cp -a $src/applications $fs/usr/share |
pankso@806 | 29 |
pascal@12343 | 30 # Fix loopfs case (thanks xjjx) |
pascal@12343 | 31 sed -i 's|.*to tmpfs.*|[ -d /mnt/etc ] \&\& launch_init\n&|' $fs/init |
pascal@12343 | 32 |
pankso@16 | 33 # Perms |
pankso@2787 | 34 chown -R root.root $fs |
pankso@16 | 35 chmod 755 $fs/etc/init.d/*.sh |
pankso@16 | 36 chmod 755 $fs/etc/init.d/rc* |
pascal@11620 | 37 chmod 755 $fs/init |
pankso@16 | 38 } |
pankso@16 | 39 |
pankso@265 | 40 # Pre install commands. |
pankso@16 | 41 # |
pankso@16 | 42 pre_install() |
pankso@16 | 43 { |
pankso@16 | 44 local root |
pankso@16 | 45 root=$1 |
pankso@806 | 46 |
pankso@16 | 47 # Backup file to restore with post install |
pankso@52 | 48 echo "Creating backups of configs..." |
pankso@52 | 49 cp $root/etc/rcS.conf $root/etc/rcS.conf.bak 2>/dev/null |
pankso@52 | 50 cp $root/etc/network.conf $root/etc/network.conf.bak 2>/dev/null |
pankso@52 | 51 cp $root/etc/inittab $root/etc/inittab.bak 2>/dev/null |
pankso@52 | 52 cp $root/etc/init.d/local.sh $root/etc/init.d/local.sh.bak 2>/dev/null |
pankso@16 | 53 } |
pankso@16 | 54 |
pankso@16 | 55 post_install() |
pankso@16 | 56 { |
pankso@16 | 57 local root |
pankso@16 | 58 root=$1 |
pankso@52 | 59 echo "Restoring configs backups..." |
pankso@52 | 60 mv -f $root/etc/rcS.conf.bak $root/etc/rcS.conf 2>/dev/null |
pankso@52 | 61 mv -f $root/etc/network.conf.bak $root/etc/network.conf 2>/dev/null |
pankso@52 | 62 mv -f $root/etc/inittab.bak $root/etc/inittab 2>/dev/null |
pankso@52 | 63 mv -f $root/etc/init.d/local.sh.bak $root/etc/init.d/local.sh 2>/dev/null |
pankso@806 | 64 |
pankso@2787 | 65 # Fast boot X config from 3.0 |
pankso@2787 | 66 if ! grep -q ^FAST_BOOT_X $root/etc/rcS.conf; then |
pankso@2787 | 67 cat >> $root/etc/rcS.conf << "EOT" |
pankso@4018 | 68 # Fast boot into X by setting the system keymap-locale and starting |
pankso@2787 | 69 # the Slim login manager earlier at boot time. If fast X is enabled |
pankso@2787 | 70 # then dbus, hald and slim can be removed from RUN_DAEMONS. |
pankso@2787 | 71 FAST_BOOT_X="no" |
pankso@609 | 72 |
pankso@609 | 73 EOT |
pascal@2792 | 74 fi |
pankso@10717 | 75 # Fbsplash gui boot |
pankso@10717 | 76 if ! grep -q ^FBSPLASH $root/etc/rcS.conf; then |
pankso@10717 | 77 cat >> $root/etc/rcS.conf << "EOT" |
pankso@10717 | 78 # Graphical boot with fbsplash (To easily configure use: tazfbsplash) |
pankso@10717 | 79 FBSPLASH="no" |
pankso@10717 | 80 FBSPLASH_THEME="slitaz" |
pankso@10717 | 81 |
pankso@10717 | 82 EOT |
pankso@10717 | 83 fi |
pankso@10717 | 84 |
pankso@10717 | 85 # No more hwconf.sh and i18n.sh --> system.sh |
pankso@10717 | 86 sed -i s'/hwconf.sh/system.sh/' $root/etc/rcS.conf |
pankso@10717 | 87 sed -i s'/i18n.sh//' $root/etc/rcS.conf |
pankso@10717 | 88 |
pankso@2791 | 89 # Remove old desktop file |
pankso@2791 | 90 rm -f /usr/share/applications/boot-log.desktop |
pankso@16 | 91 } |