wok-4.x rev 5535

slitaz-loram-http: add tazlito/loram support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 12 14:10:24 2010 +0200 (2010-05-12)
parents f1da087b3a24
children 01b2b28aaebe
files slitaz-loram-http/receipt slitaz-loram-http/stuff/loram.extract slitaz-loram-http/stuff/loram.rootfs
line diff
     1.1 --- a/slitaz-loram-http/receipt	Tue May 11 15:39:59 2010 -0400
     1.2 +++ b/slitaz-loram-http/receipt	Wed May 12 14:10:24 2010 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="slitaz-loram-http"
     1.7 -VERSION="1.5"
     1.8 +VERSION="1.6"
     1.9  CATEGORY="misc"
    1.10  SHORT_DESC="Rules to build low ram system using http."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 @@ -24,7 +24,7 @@
    1.13      tag="Handle kernel cmdline parameter config"
    1.14      i=$(grep -n "$tag" $1/etc/init.d/rcS | cut -d: -f1)
    1.15      i=$(($i-1))
    1.16 -    len=72
    1.17 +    len=89
    1.18      tag=$(grep "$tag" $1/etc/init.d/rcS)
    1.19      if [ "$2" = "-R" ]; then
    1.20      	line="-$(($i-$len+2)),$len +$(($i-$len+2)),2"
    1.21 @@ -75,7 +75,10 @@
    1.22  $i while [ -d /cdrom ]; do
    1.23  $i	/etc/init.d/network.sh
    1.24  $i	RUN_SCRIPTS="\$(echo \$RUN_SCRIPTS | sed 's/network.sh//')"
    1.25 -$i	URLISO=http://mirror.slitaz.org/iso/\$(cat /etc/slitaz-release)/flavors/slitaz-loram-cdrom.iso,http://download.tuxfamily.org/slitaz/iso/\$(cat /etc/slitaz-release)/flavors/slitaz-loram-cdrom.iso,http://slitaz.c3sl.ufpr.br/iso/\$(cat /etc/slitaz-release)/flavors/slitaz-loram-cdrom.iso
    1.26 +$i	release=\$(cat /etc/slitaz-release)
    1.27 +$i	iso1=iso/\$release/flavors/slitaz-\$release-loram-cdrom.iso
    1.28 +$i	iso2=iso/\$release/flavors/slitaz-loram-cdrom.iso
    1.29 +$i	URLISO=http://mirror.slitaz.org/\$iso1,http://mirror.slitaz.org/\$iso2,http://download.tuxfamily.org/slitaz/\$iso1,http://download.tuxfamily.org/slitaz/\$iso2,http://slitaz.c3sl.ufpr.br/\$iso1,http://slitaz.c3sl.ufpr.br/\$iso2
    1.30  $i	grep -q " urliso=" /proc/cmdline && URLISO=\$(cat /proc/cmdline | sed 's/.* urliso=\([^ ]*\).*/\1/'),\$URLISO
    1.31  $i	for i in \$(echo \$URLISO | sed 's/,/ /g'); do
    1.32  $i		/bin/httpfs \$i /cdrom && break
    1.33 @@ -91,16 +94,30 @@
    1.34  $i	FS=/cdrom/usr.cromfs
    1.35  $i	if [ -f \$FS ]; then
    1.36  $i		mkdir /\$usr
    1.37 +$i		ln -s /usr/.moved /.moved
    1.38  $i		release_http && break
    1.39  $i		/bin/cromfs-driver \$FS /\$usr -o ro,dev,suid,allow_other
    1.40 -$i	elif [ -f /cdrom/usr.sqfs ]; then
    1.41 +$i	elif grep -q squashfs /etc/filesystems && [ -f /cdrom/usr.sqfs ]; then
    1.42  $i		FS=/cdrom/usr.sqfs
    1.43 +$i		ln -s /usr/.moved /.moved
    1.44  $i		mkdir /\$usr
    1.45  $i		release_http && break
    1.46  $i		mount -o loop,ro -t squashfs \$FS /\$usr
    1.47 +$i	elif grep -q squashfs /etc/filesystems && [ -f /cdrom/rootfs.gz ]; then
    1.48 +$i		FS=/cdrom/rootfs.gz
    1.49 +$i		ln -s /.rootfs /.moved
    1.50 +$i		mkdir /.rootfs
    1.51 +$i		release_http && break
    1.52 +$i		mount -o loop,ro -t squashfs \$FS /.rootfs
    1.53 +$i		ln -s /.rootfs/usr /\$usr
    1.54 +$i	elif [ -d /cdrom/usr ]; then
    1.55 +$i		FS=/cdrom/usr
    1.56 +$i		ln -s /usr/.moved /.moved
    1.57 +$i		rm -rf /\$usr && ln -s \$FS /\$usr
    1.58  $i	else
    1.59 -$i		FS=/cdrom/usr
    1.60 -$i		ln -s \$FS /\$usr
    1.61 +$i		FS=/cdrom/fs/usr
    1.62 +$i		ln -s /cdrom/fs /.moved
    1.63 +$i		rm -rf /\$usr && ln -s \$FS /\$usr
    1.64  $i	fi
    1.65  $i	status 
    1.66  $i	if [ -d /.usr.rw -a -x /bin/funionfs ]; then
     2.1 --- a/slitaz-loram-http/stuff/loram.extract	Tue May 11 15:39:59 2010 -0400
     2.2 +++ b/slitaz-loram-http/stuff/loram.extract	Wed May 12 14:10:24 2010 +0200
     2.3 @@ -21,14 +21,15 @@
     2.4  	sbin/unsquashfs -d usr $packedfs > /dev/null
     2.5  	[ "${packedfs%%/*}" = ".." ] && rm -f $packedfs
     2.6  fi
     2.7 -if [ -d usr/.moved ]; then
     2.8 -	( cd usr/.moved ; find * -print ) | \
     2.9 +if [ -d .moved ]; then
    2.10 +	( cd .moved ; find * -print ) | \
    2.11  	while read file; do
    2.12  		[ -L "$file" ] || continue
    2.13  		rm -f "$file"
    2.14 -		mv "usr/.moved/$file" "$file"
    2.15 +		mv ".moved/$file" "$file"
    2.16  	done
    2.17 -	rm -rf usr/.moved
    2.18 +	rm -rf usr/.moved 2> /dev/null
    2.19 +	rm -f .moved
    2.20  fi
    2.21  for ii in lib/libz.so lib/libstdc++.so lib/libgcc_s.so; do
    2.22  	[ -e $ii ] && mv $ii* usr/lib/
     3.1 --- a/slitaz-loram-http/stuff/loram.rootfs	Tue May 11 15:39:59 2010 -0400
     3.2 +++ b/slitaz-loram-http/stuff/loram.rootfs	Wed May 12 14:10:24 2010 +0200
     3.3 @@ -12,7 +12,7 @@
     3.4      for k in $(grep -s ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do
     3.5        [ -f .$k ] || continue
     3.6        mv .$k ./usr/.moved$k
     3.7 -      ln -s /usr/.moved$k .$k 
     3.8 +      ln -s /.moved$k .$k 
     3.9      done
    3.10    done
    3.11  done
    3.12 @@ -23,7 +23,7 @@
    3.13    j=$(dirname /usr/.moved$ii)
    3.14    mkdir -p .$j
    3.15    mv .$ii .$j
    3.16 -  ln -s /usr/.moved$ii .$ii
    3.17 +  ln -s /.moved$ii .$ii
    3.18  done
    3.19  echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
    3.20  mv usr/bin/httpfs bin