wok-6.x annotate slitaz-loram-cdrom/receipt @ rev 309
Slitaz-loram*: update patch according to /etc/init.d/rcS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 01 12:55:33 2008 +0000 (2008-03-01) |
parents | 39ab194bbbef |
children | fc9f573e8ac8 |
rev | line source |
---|---|
pascal@251 | 1 # SliTaz package receipt. |
pascal@251 | 2 |
pascal@251 | 3 PACKAGE="slitaz-loram-cdrom" |
pascal@251 | 4 VERSION="1.0" |
pascal@251 | 5 CATEGORY="misc" |
pascal@251 | 6 SHORT_DESC="Rules to build low ram system using cdrom." |
pascal@251 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@251 | 8 |
pascal@251 | 9 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@251 | 10 genpkg_rules() |
pascal@251 | 11 { |
pascal@251 | 12 mkdir -p $fs/etc/tazlito |
pascal@309 | 13 cp stuff/loram.rootfs $fs/etc/tazlito |
pascal@251 | 14 } |
pascal@251 | 15 |
pascal@251 | 16 get_patch() |
pascal@251 | 17 { |
pascal@251 | 18 cat <<EOF |
pascal@251 | 19 --- /etc/init.d/rcS |
pascal@251 | 20 +++ /etc/init.d/rcS |
pascal@309 | 21 @@ -53,4 +53,4 @@ |
pascal@309 | 22 /bin/dmesg > /var/log/dmesg.log |
pascal@309 | 23 -/usr/bin/vcsa2txt < /dev/vcsa1 > /var/log/boot.log |
pascal@309 | 24 -/usr/bin/script -a -q -c '/etc/init.d/rcS logged' /var/log/boot.log |
pascal@309 | 25 +busybox vcsa2txt < /dev/vcsa1 > /var/log/boot.log |
pascal@309 | 26 +busybox script -a -q -c '/etc/init.d/rcS logged' /var/log/boot.log |
pascal@309 | 27 |
pascal@309 | 28 @@ -62,4 +62,4 @@ |
pascal@251 | 29 # |
pascal@251 | 30 -DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3` |
pascal@251 | 31 -if [ ! "`readlink /dev/cdrom`" ]; then |
pascal@251 | 32 +DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | busybox cut -f 3` |
pascal@251 | 33 +if [ ! "`busybox readlink /dev/cdrom`" ]; then |
pascal@251 | 34 echo -n "Creating symlink : /dev/cdrom..." |
pascal@309 | 35 @@ -87,2 +87,15 @@ |
pascal@251 | 36 |
pascal@251 | 37 +# Mount /usr |
pascal@251 | 38 +if [ -d /cdrom ]; then |
pascal@251 | 39 + echo -n "Mounting /usr read-only from /cdrom... " |
pascal@309 | 40 + mount -o ro -t iso9660 /dev/cdrom /cdrom |
pascal@251 | 41 + if [ -f /cdrom/usr.sqfs ]; then |
pascal@309 | 42 + mount -o loop,ro -t squashfs /cdrom/usr.sqfs /usr |
pascal@309 | 43 + elif [ ! -L /usr ]; then |
pascal@309 | 44 + umount /cdrom |
pascal@309 | 45 + false |
pascal@251 | 46 + fi |
pascal@251 | 47 + status |
pascal@251 | 48 +fi |
pascal@251 | 49 + |
pascal@309 | 50 # Handle kernel cmdline parameter config=<device>,<path> to source a |
pascal@251 | 51 EOF |
pascal@251 | 52 } |
pascal@251 | 53 |
pascal@251 | 54 # Pre and post install commands for Tazpkg. |
pascal@251 | 55 pre_install() |
pascal@251 | 56 { |
pascal@251 | 57 local $loram |
pascal@251 | 58 loram=$(cd /var/lib/tazpkg/installed ; ls -d slitaz-loram* 2> /dev/null) |
pascal@251 | 59 [ -n "$loram" ] && yes y | tazpkg remove $loram |
pascal@251 | 60 } |
pascal@251 | 61 |
pascal@251 | 62 post_install() |
pascal@251 | 63 { |
pascal@251 | 64 get_patch | patch -p0 |
pascal@251 | 65 } |
pascal@251 | 66 |
pascal@251 | 67 # Pre remove commands for Tazpkg. |
pascal@251 | 68 pre_remove() |
pascal@251 | 69 { |
pascal@309 | 70 [ -L /usr/bin/patch ] || get_patch | patch -R -p0 |
pascal@251 | 71 } |