wok diff slitaz-loram/receipt @ rev 1884

slitaz-loram*: add aufs support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 17 15:09:01 2008 +0000 (2008-12-17)
parents ca15fff92039
children 4aeb7e80b8ca
line diff
     1.1 --- a/slitaz-loram/receipt	Wed Dec 10 19:40:03 2008 +0000
     1.2 +++ b/slitaz-loram/receipt	Wed Dec 17 15:09:01 2008 +0000
     1.3 @@ -25,11 +25,11 @@
     1.4      i=$(($i-1))
     1.5      tag=$(grep "$tag" $1/etc/init.d/rcS)
     1.6      if [ "$2" = "-R" ]; then
     1.7 -    	line="-$(($i-21)),23 +$(($i-21)),2"
     1.8 +    	line="-$(($i-25)),27 +$(($i-25)),2"
     1.9  	i="-"
    1.10      else
    1.11          grep -q 'from slitaz-loram package' $1/etc/init.d/rcS && return
    1.12 -    	line="-$i,2 +$i,23"
    1.13 +    	line="-$i,2 +$i,27"
    1.14  	i="+"
    1.15      fi
    1.16      patch -p0 <<EOF
    1.17 @@ -48,12 +48,16 @@
    1.18  $i		echo -n "only... "
    1.19  $i	fi
    1.20  $i	if [ -f /.usr.cromfs ]; then
    1.21 -$i		/bin/cromfs-driver \$FS /\$usr -o ro,dev,suid,allow_other
    1.22 +$i		/bin/cromfs-driver /.usr.cromfs /\$usr -o ro,dev,suid,allow_other
    1.23  $i	else
    1.24  $i		/bin/mount -o loop,ro -t squashfs /.usr.sqfs /\$usr
    1.25  $i	fi
    1.26  $i	if [ -d /.usr.rw ]; then
    1.27 -$i		/bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other -o suid,dev NONE /usr
    1.28 +$i		if [ -x bin/funionfs ]; then
    1.29 +$i			/bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other -o suid,dev NONE /usr
    1.30 +$i		else
    1.31 +$i			/bin/mount -t aufs -o br:/.usr.ro:/.usr.rw none /usr
    1.32 +$i		fi
    1.33  $i	fi
    1.34  $i	status
    1.35  $i fi
    1.36 @@ -78,12 +82,14 @@
    1.37  post_install()
    1.38  {
    1.39      set_patch "$1"
    1.40 -    if [ ! -x $1/bin/funionfs ]; then
    1.41 +    if [ ! -x $1/bin/funionfs -a ! -d $1/var/lib/tazpkg/installed/aufs ]; then
    1.42          cat <<EOF
    1.43  ----
    1.44  You will build a live CD with /usr mounted read-only.
    1.45 -You can install funionfs to have read-write access into /usr with:
    1.46 +You can install aufs or funionfs to have read-write access into /usr with:
    1.47  
    1.48 +# tazpkg get-install aufs
    1.49 +or
    1.50  # tazpkg get-install funionfs
    1.51  
    1.52  EOF