wok rev 850

Slitaz-loram-cdrom: fix squashfs case
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue May 20 22:11:39 2008 +0000 (2008-05-20)
parents 25066eeb8547
children 5149ba870916
files slitaz-loram-cdrom/receipt slitaz-loram-cdrom/stuff/loram.extract slitaz-loram-cdrom/stuff/loram.rootfs
line diff
     1.1 --- a/slitaz-loram-cdrom/receipt	Tue May 20 18:35:02 2008 +0000
     1.2 +++ b/slitaz-loram-cdrom/receipt	Tue May 20 22:11:39 2008 +0000
     1.3 @@ -65,8 +65,8 @@
     1.4  $i	if [ -f \$FS ]; then
     1.5  $i		release_cdrom
     1.6  $i		/bin/cromfs-driver \$FS /\$usr
     1.7 -$i	FS=/cdrom/usr.sqfs
     1.8 -$i	elif [ -f \$FS ]; then
     1.9 +$i	elif [ -f /cdrom/usr.sqfs ]; then
    1.10 +$i		FS=/cdrom/usr.sqfs
    1.11  $i		release_cdrom
    1.12  $i		mount -o loop,ro -t squashfs \$FS /\$usr
    1.13  $i	elif [ -L /\$usr ]; then
     2.1 --- a/slitaz-loram-cdrom/stuff/loram.extract	Tue May 20 18:35:02 2008 +0000
     2.2 +++ b/slitaz-loram-cdrom/stuff/loram.extract	Tue May 20 22:11:39 2008 +0000
     2.3 @@ -1,6 +1,6 @@
     2.4  # remove link to cdrom
     2.5  [ -d cdrom ] && rmdir cdrom
     2.6 -rm -f bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink
     2.7 +rm -f bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free
     2.8  if [ -L usr ]; then
     2.9  	rm usr
    2.10  	cp -a $1/usr .
     3.1 --- a/slitaz-loram-cdrom/stuff/loram.rootfs	Tue May 20 18:35:02 2008 +0000
     3.2 +++ b/slitaz-loram-cdrom/stuff/loram.rootfs	Tue May 20 22:11:39 2008 +0000
     3.3 @@ -45,39 +45,41 @@
     3.4    [ "$usr" = "usr" ] || mv $usr usr
     3.5    ln -s /cdrom/usr $usr
     3.6  fi
     3.7 -for ii in *; do
     3.8 -  case "$ii" in
     3.9 -  usr|boot) continue;;
    3.10 -  mnt|media|sys|proc|cdrom) mkdir ../rootcd/$ii;;
    3.11 -  *) cp -a $ii ../rootcd/$ii;;
    3.12 -  esac
    3.13 -done
    3.14 -for ii in keymap.conf locale.conf resolv.conf TZ motd; do
    3.15 -  ln -s /tmp/$ii ../rootcd/etc
    3.16 -done
    3.17 -for ii in log run lock; do
    3.18 -  mv ../rootcd/var/$ii ../rootcd/var/$ii.ORG
    3.19 -  ln -s /tmp/$ii ../rootcd/var
    3.20 -done
    3.21 -mv ../rootcd/root ../rootcd/root.ORG
    3.22 -ln -s /tmp ../rootcd/root
    3.23 -ln -s / ../rootcd/media/cdrom
    3.24 -mkdir ../rootcd/mnt/target
    3.25 -sed -i 's/CLEAN_UP_SYSTEM="yes"/CLEAN_UP_SYSTEM="no"/' ../rootcd/etc/rcS.conf
    3.26 -sed -i 's/RUN_DAEMONS=.*/RUN_DAEMONS=""/' ../rootcd/etc/rcS.conf
    3.27 -for ii in ../rootcd/boot/isolinux/*.cfg; do
    3.28 -  cat $ii | awk '{ print } /append/ { printf "label loram\n\tkernel /boot/bzImage\n\tappend ro sound=noconf screen=text %s %s %s\n",$5,$6,$7 }' > $ii.tmp
    3.29 -  mv -f $ii.tmp $ii
    3.30 -done
    3.31 -cat >> ../rootcd/boot/isolinux/enopts.txt <<EOT
    3.32 +if [ -d ../rootcd/usr/lib ]; then
    3.33 +  for ii in *; do
    3.34 +    case "$ii" in
    3.35 +    usr|boot) continue;;
    3.36 +    mnt|media|sys|proc|cdrom) mkdir ../rootcd/$ii;;
    3.37 +    *) cp -a $ii ../rootcd/$ii;;
    3.38 +    esac
    3.39 +  done
    3.40 +  for ii in keymap.conf locale.conf resolv.conf TZ motd; do
    3.41 +    ln -s /tmp/$ii ../rootcd/etc
    3.42 +  done
    3.43 +  for ii in log run lock; do
    3.44 +    mv ../rootcd/var/$ii ../rootcd/var/$ii.ORG
    3.45 +    ln -s /tmp/$ii ../rootcd/var
    3.46 +  done
    3.47 +  mv ../rootcd/root ../rootcd/root.ORG
    3.48 +  ln -s /tmp ../rootcd/root
    3.49 +  ln -s / ../rootcd/media/cdrom
    3.50 +  mkdir ../rootcd/mnt/target
    3.51 +  sed -i 's/CLEAN_UP_SYSTEM="yes"/CLEAN_UP_SYSTEM="no"/' ../rootcd/etc/rcS.conf
    3.52 +  sed -i 's/RUN_DAEMONS=.*/RUN_DAEMONS=""/' ../rootcd/etc/rcS.conf
    3.53 +  for ii in ../rootcd/boot/isolinux/*.cfg; do
    3.54 +    cat $ii | awk '{ print } /append/ { printf "label loram\n\tkernel /boot/bzImage\n\tappend ro sound=noconf screen=text %s %s %s\n",$5,$6,$7 }' > $ii.tmp
    3.55 +    mv -f $ii.tmp $ii
    3.56 +  done
    3.57 +  cat >> ../rootcd/boot/isolinux/enopts.txt <<EOT
    3.58   With few RAM, you can use loram entry with the cdrom device; example:
    3.59   boot: loram root=/dev/hdc
    3.60  EOT
    3.61 -cat >> ../rootcd/boot/isolinux/options.txt <<EOT
    3.62 +  cat >> ../rootcd/boot/isolinux/options.txt <<EOT
    3.63   Avec peu de RAM, utilisez l'entrée loram en précisant le cdrom, exemple:
    3.64   boot: loram root=/dev/hdc
    3.65  EOT
    3.66 -for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink ; do
    3.67 +fi
    3.68 +for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free; do
    3.69    ln -s busybox $ii
    3.70  done
    3.71  mkdir cdrom