wok-stable view linux-lxc/receipt @ rev 12424
Fix end of line
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sat Dec 21 10:59:45 2013 +0100 (2013-12-21) |
parents | aff1e1277a06 |
children | d2c12f99da19 |
line source
1 # SliTaz package receipt
3 PACKAGE="linux-lxc"
4 VERSION="2.6.37"
5 CATEGORY="misc"
6 SHORT_DESC="The Linux kernel and modules with LXC support."
7 MAINTAINER="shann@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://linuxcontainers.org/"
10 WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL"
11 PROVIDE="linux"
13 DEPENDS="lxc"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 cp -a $src/boot $fs
19 cp -a $src/lib/modules $fs/lib
20 cp -a $src/lib/firmware $fs/lib
21 chown -R root.root $fs
22 }
24 # Pre and post install commands for Tazpkg.
25 post_install()
26 {
27 echo "Update /etc/fstab for use cgroup..."
28 echo "none /cgroup cgroup defaults 0 0" >> /etc/fstab
30 echo "Processing post-install commands..."
31 chroot "$1/" depmod -a $VERSION-lxc-slitaz
32 # GRUB stuff.
33 if [ -f "$1/boot/grub/menu.lst" ]; then
34 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
35 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
36 # Add new kernel entry in case of upgrade for installed system.
37 if ! grep -q $PACKAGE-$VERSION-lxc-slitaz $1/boot/grub/menu.lst; then
38 cat >> $1/boot/grub/menu.lst << EOT
40 title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz)
41 $grub_dev
42 kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev
43 EOT
44 fi
45 # Display information message.
46 cat <<EOT
47 ----
48 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
50 title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz)
51 $grub_dev
52 kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev
53 ----
54 EOT
55 fi
56 }