wok diff slitaz-loram-cdrom/receipt @ rev 780

slitaz-loram-cdrom: loram boot entry to start 12Mb ram machines
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 12 20:37:29 2008 +0000 (2008-05-12)
parents 17481ec4d76e
children a3a3c2bac53d
line diff
     1.1 --- a/slitaz-loram-cdrom/receipt	Sun May 11 00:32:32 2008 +0000
     1.2 +++ b/slitaz-loram-cdrom/receipt	Mon May 12 20:37:29 2008 +0000
     1.3 @@ -87,6 +87,31 @@
     1.4  $i
     1.5   $tag
     1.6  EOF
     1.7 +    tag="/var/log/dmesg.log"
     1.8 +    i=$(grep -n "$tag" $1/etc/init.d/rcS | cut -d: -f1)
     1.9 +    i=$(($i-1))
    1.10 +    tag=$(grep "$tag" $1/etc/init.d/rcS)
    1.11 +    if [ "$2" = "-R" ]; then
    1.12 +    	line="-$(($i-7)),9 +$(($i-7)),2"
    1.13 +	i="-"
    1.14 +    else
    1.15 +    	line="-$i,2 +$i,9"
    1.16 +	i="+"
    1.17 +    fi
    1.18 +    patch -p0 <<EOF
    1.19 +--- $1/etc/init.d/rcS
    1.20 ++++ $1/etc/init.d/rcS
    1.21 +@@ $line @@
    1.22 + 
    1.23 +$i# Build ramdisk if root=/dev/cdrom (from slitaz-loram-cdrom package)
    1.24 +$i if [ -L /root ]; then
    1.25 +$i	mount -t tmpfs ramdisk /tmp
    1.26 +$i	mkdir -p /tmp/log/lighttpd /tmp/run /tmp/lock
    1.27 +$i	chown www.www /tmp/log/lighttpd
    1.28 +$i fi
    1.29 +$i
    1.30 + $tag
    1.31 +EOF
    1.32      chmod 0755 $1/etc/init.d/rcS
    1.33  }
    1.34