wok diff slitaz-loram/receipt @ rev 370

Slitaz-loram*: more flexible
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 08 11:30:12 2008 +0000 (2008-03-08)
parents c570ed86d31a
children 1408dfa76481
line diff
     1.1 --- a/slitaz-loram/receipt	Sat Mar 08 01:10:18 2008 +0000
     1.2 +++ b/slitaz-loram/receipt	Sat Mar 08 11:30:12 2008 +0000
     1.3 @@ -11,29 +11,44 @@
     1.4  genpkg_rules()
     1.5  {
     1.6      mkdir -p $fs/etc/tazlito
     1.7 -    cp stuff/loram.rootfs $fs/etc/tazlito
     1.8 +    cp stuff/loram.* $fs/etc/tazlito
     1.9  }
    1.10  
    1.11  get_patch()
    1.12  {
    1.13 +    local tag
    1.14 +    local line
    1.15 +    local i
    1.16 +    tag="Creat /dev/cdrom if needed"
    1.17 +    i=$(grep -n "$tag" /etc/init.d/rcS | cut -d: -f1)
    1.18 +    i=$(($i-1))
    1.19 +    tag=$(grep "$tag" /etc/init.d/rcS)
    1.20 +    if [ "$1" = "-R" ]; then
    1.21 +    	line="-$(($i-13)),15 +$(($i-13)),2"
    1.22 +	i="-"
    1.23 +    else
    1.24 +    	line="-$i,2 +$i,15"
    1.25 +	i="+"
    1.26 +    fi
    1.27      cat <<EOF
    1.28  --- /etc/init.d/rcS
    1.29  +++ /etc/init.d/rcS
    1.30 -@@ -58,2 +58,14 @@
    1.31 +@@ $line @@
    1.32   
    1.33 -+# Mount compressed /usr
    1.34 -+if [ -f /.usr.cromfs ]; then
    1.35 -+	echo -n "Mounting compressed /usr read-only... "
    1.36 -+	if [ -d /.usr.rw ]; then
    1.37 -+		/bin/cromfs-driver /.usr.cromfs /.usr.ro
    1.38 -+		/bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other NONE /usr
    1.39 -+	else
    1.40 -+		/bin/cromfs /.usr.cromfs /usr
    1.41 -+	fi
    1.42 -+	status
    1.43 -+fi
    1.44 -+
    1.45 - # Creat /dev/cdrom if needed (symlink does not exist on LiveCD). Chmod
    1.46 +$i# Mount compressed /usr
    1.47 +$i if [ -f /.usr.cromfs ]; then
    1.48 +$i	if [ -d /.usr.rw ]; then
    1.49 +$i		echo -n "Mounting compressed /usr read-write... "
    1.50 +$i		/bin/cromfs-driver /.usr.cromfs /.usr.ro
    1.51 +$i		/bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other NONE /usr
    1.52 +$i	else
    1.53 +$i		echo -n "Mounting compressed /usr read-only... "
    1.54 +$i		/bin/cromfs /.usr.cromfs /usr
    1.55 +$i	fi
    1.56 +$i	status
    1.57 +$i fi
    1.58 +$i
    1.59 + $tag
    1.60  EOF
    1.61  }
    1.62  
    1.63 @@ -53,5 +68,5 @@
    1.64  # Pre remove commands for Tazpkg.
    1.65  pre_remove()
    1.66  {
    1.67 -    [ -L /usr/bin/patch ] || get_patch | patch -R -p0
    1.68 +    get_patch -R | patch -p0
    1.69  }