wok-next rev 18240
syslinux/taziso: do not use /media/cdrom
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jul 28 08:46:03 2015 +0200 (2015-07-28) |
parents | 4ea96657834e |
children | f630a53bd713 |
files | fake-sane/receipt syslinux/stuff/iso2exe/taziso tazpanel/receipt |
line diff
1.1 --- a/fake-sane/receipt Sun Jul 26 17:30:32 2015 +0200 1.2 +++ b/fake-sane/receipt Tue Jul 28 08:46:03 2015 +0200 1.3 @@ -3,7 +3,7 @@ 1.4 PACKAGE="fake-sane" 1.5 VERSION="1.0" 1.6 CATEGORY="system-tools" 1.7 -SHORT_DESC="Fake scanimage output for sane.cgi." 1.8 +SHORT_DESC="Fake scanimage output for tazpanel/sane.cgi." 1.9 MAINTAINER="pascal.bellard@slitaz.org" 1.10 LICENSE="BSD" 1.11 WEB_SITE="http://www.slitaz.org/"
2.1 --- a/syslinux/stuff/iso2exe/taziso Sun Jul 26 17:30:32 2015 +0200 2.2 +++ b/syslinux/stuff/iso2exe/taziso Tue Jul 28 08:46:03 2015 +0200 2.3 @@ -209,13 +209,13 @@ 2.4 fi 2.5 dotwait "Install root filesystem in /slitaz.." 2.6 if [ "$1" ]; then 2.7 - ls_r /media/cdrom/boot/rootfs*gz | \ 2.8 + ls_r $media/boot/rootfs*gz | \ 2.9 xargs cat > $mnt/slitaz/boot/rootfs.gz 2.10 tazusbinitfs $mnt/slitaz/boot/rootfs.gz $useposixovl 2.11 initrd=rootfs.gz 2.12 extraargs="/home=$(getuuid)/slitaz rdinit=/init1" 2.13 else 2.14 - for i in $(ls_r /media/cdrom/boot/rootfs*gz); do 2.15 + for i in $(ls_r $media/boot/rootfs*gz); do 2.16 uncpio $i $mnt/slitaz 2.17 done 2.18 for i in $packages_list; do 2.19 @@ -232,9 +232,9 @@ 2.20 extraargs="mount=$(getuuid) subroot=slitaz" 2.21 fi 2.22 echo -en "\nInstall boot files..." 2.23 - for i in /media/cdrom/boot/bzImage /media/cdrom/boot/*pxe* \ 2.24 - /media/cdrom/boot/isolinux/he* /media/cdrom/boot/isolinux/opt* \ 2.25 - /media/cdrom/README /media/cdrom/boot/memtest* ; do 2.26 + for i in $media/boot/bzImage $media/boot/*pxe* \ 2.27 + $media/boot/isolinux/he* $media/boot/isolinux/opt* \ 2.28 + $media/README $media/boot/memtest* ; do 2.29 [ -s $i ] && cp $i $mnt/slitaz/boot 2.30 done 2.31 for i in $mnt/slitaz/boot/memtest $mnt/slitaz/boot/*pxe* ; do 2.32 @@ -338,14 +338,14 @@ 2.33 " 7 70 2.34 [ $? -eq 0 ] || return 2.35 [ -s /var/lib/tazpkg/packages.txt ] || tazpkg recharge 2.36 - if [ -s /media/cdrom/boot/vmlinuz-$(uname -r) ]; then 2.37 + if [ -s $media/boot/vmlinuz-$(uname -r) ]; then 2.38 cat > /tmp/dialog$$ <<EOT 2.39 $DIALOG --clear \ 2.40 --title " Select the packages " \ 2.41 --separate-output \ 2.42 --cancel-label "Skip" \ 2.43 --checklist "Please select the packages you want to install. Try with the first letter." \ 2.44 - 23 78 20 \\ 2.45 + 0 0 0 \\ 2.46 EOT 2.47 awk -F\| '{ printf "%s \"%s\" off ",$1,$3 }' \ 2.48 /var/lib/tazpkg/packages.desc >> /tmp/dialog$$ 2.49 @@ -399,8 +399,7 @@ 2.50 kexec -l $kernel --initrd $initrd --command-line "$cmdline" || return 2.51 umount $mnt 2.52 rm -rf $mnt 2.53 - umount -d /media/cdrom 2.54 - kexec -e 2.55 + quit "kexec -e" 2.56 } 2.57 2.58 mkzip() 2.59 @@ -537,20 +536,19 @@ 2.60 2.61 bootiso() 2.62 { 2.63 - for i in $(ls_r /media/cdrom/boot/rootfs*gz); do 2.64 + for i in $(ls_r $media/boot/rootfs*gz); do 2.65 grep -q ' lm ' /proc/cpuinfo && [ -s ${i}64 ] && i=${i}64 2.66 cat $i 2.67 n=$((4 - ($(stat -c %s $i) % 4))) 2.68 [ $n -eq 4 ] || dd if=/dev/zero bs=1 count=$n 2.69 done > /tmp/initrd$$ 2.70 - kernel=/media/cdrom/boot/bzImage 2.71 + kernel=$media/boot/bzImage 2.72 grep -q ' lm ' /proc/cpuinfo && [ -s ${kernel}64 ] && kernel=${kernel}64 2.73 . /etc/locale.conf 2.74 kexec -l $kernel --initrd /tmp/initrd$$ --command-line \ 2.75 "root=/dev/null autologin lang=$LANG kmap=$(cat /etc/keymap.conf)" && 2.76 - umount -d /media/cdrom 2.77 rm -f /tmp/initrd$$ 2.78 - kexec -e 2.79 + quit "kexec -e" 2.80 } 2.81 2.82 tazboot() 2.83 @@ -572,7 +570,7 @@ 2.84 rw root=/dev/null autologin\n\n\ 2.85 kernel=\\slitaz\\vmlinuz root=/dev/sda5 ro\n\n 2.86 Unlike GRUB4DOS, it doesn't require unfragmented ISO image files.\n 2.87 -" 24 78 2.88 +" 0 0 2.89 [ $? -eq 0 ] || return 2.90 fi 2.91 gettazboot tazboot.exe 2.92 @@ -582,7 +580,7 @@ 2.93 md5() 2.94 { 2.95 dotwait "Checking files" 2.96 - ( cd /media/cdrom ; ${md5sum:-md5sum -c md5sum*} | sort ) > /tmp/data 2.97 + ( cd $media ; ${md5sum:-md5sum -c md5sum*} | sort ) > /tmp/data 2.98 unset md5sum 2.99 rm -f /tmp/wait 2.100 if [ "$1" ]; then 2.101 @@ -590,15 +588,14 @@ 2.102 else 2.103 $DIALOG --clear \ 2.104 --title " Checked files " \ 2.105 - --textbox /tmp/data 24 78 2.106 + --textbox /tmp/data 0 0 2.107 fi 2.108 rm -f /tmp/data 2.109 } 2.110 2.111 gotcdfile() 2.112 { 2.113 - for i in "/media/cdrom/$1" "/media/cdrom/*/$1" \ 2.114 - "/media/cdrom/*/isolinux/$1" ; do 2.115 + for i in "$media/$1" "$media/*/$1" "$media/*/isolinux/$1" ; do 2.116 file=$(ls $i 2> /dev/null | sed q) 2.117 [ -s "$file" ] && break 2.118 done 2.119 @@ -608,7 +605,7 @@ 2.120 { 2.121 gotcdfile 'sha*sum*' 2.122 sha=$(basename $file) 2.123 - md5sum="${sha%sum*}sum -c ${file#/media/cdrom/}" 2.124 + md5sum="${sha%sum*}sum -c ${file#$media/}" 2.125 md5 $@ 2.126 } 2.127 2.128 @@ -620,7 +617,7 @@ 2.129 else 2.130 $DIALOG --clear \ 2.131 --title " Readme " \ 2.132 - --textbox $file 24 78 2.133 + --textbox $file 0 0 2.134 fi 2.135 } 2.136 2.137 @@ -637,7 +634,7 @@ 2.138 " 12 70 2.139 [ $? -eq 0 ] || return 2.140 fi 2.141 - cp /media/cdrom/boot/bzImage linux.exe 2.142 + cp $media/boot/bzImage linux.exe 2.143 ls -l $PWD/linux.exe 2.144 } 2.145 2.146 @@ -650,7 +647,7 @@ 2.147 "\nMemtest86 is a thorough, stand alone memory test for x86 architecture 2.148 computers. BIOS based memory tests are a quick, cursory check and often 2.149 miss many of the failures that are detected by Memtest86.\n 2.150 -" 12 70 2.151 +" 0 0 2.152 [ $? -eq 0 ] || return 2.153 fi 2.154 gotcdfile 'memtest*' && cp $file memtest.exe 2.155 @@ -699,7 +696,7 @@ 2.156 computers. BIOS based memory tests are a quick, cursory check and often 2.157 miss many of the failures that are detected by Memtest86.\n\n 2.158 Please insert a blank disk in floppy drive.\n 2.159 -" 12 70 2.160 +" 0 0 2.161 [ $? -eq 0 ] || return 2.162 fi 2.163 gotcdfile 'memtest*' && mkfloppy $file 2.164 @@ -716,7 +713,7 @@ 2.165 working entirely in RAM with speed and stability in mind. The Linux Kernel 2.166 and the complete SliTaz compressed root filesystem will be loaded into RAM 2.167 from the Web using PXE and HTTP protocols.\n 2.168 -" 12 70 2.169 +" 0 0 2.170 [ $? -eq 0 ] || return 2.171 fi 2.172 cp $file $(basename $file).exe 2.173 @@ -734,7 +731,7 @@ 2.174 and the complete SliTaz compressed root filesystem will be loaded into RAM 2.175 from the Web using PXE and HTTP protocols.\n\n 2.176 Please insert a blank disk in floppy drive.\n 2.177 -" 12 70 2.178 +" 0 0 2.179 [ $? -eq 0 ] || return 2.180 fi 2.181 gotcdfile '?pxe' && mkfloppy $file 2.182 @@ -884,7 +881,7 @@ 2.183 $DIALOG --clear \ 2.184 --title " Select your USB key " \ 2.185 --menu "\nPlease select the USB key according to its known size.\n\n" \ 2.186 - 14 70 4 \ 2.187 + 0 0 0 \ 2.188 $(for i in $DEV ; do 2.189 echo -n "/dev/$i \"$(($(cat /sys/block/$i/size)/2048))MB $(cat /sys/block/$i/device/model 2> /dev/null)\" " 2.190 done) \ 2.191 @@ -1003,8 +1000,7 @@ 2.192 dokexec() 2.193 { 2.194 kexec -l $file || return 2.195 - umount -d /media/cdrom 2.196 - kexec -e 2.197 + quit "kexec -e" 2.198 } 2.199 2.200 runmemtest() 2.201 @@ -1044,7 +1040,7 @@ 2.202 else 2.203 $DIALOG --clear \ 2.204 --title " Flavor info " \ 2.205 - --textbox $file 24 78 2.206 + --textbox $file 0 0 2.207 fi 2.208 rm -rf /tmp/data 2.209 } 2.210 @@ -1117,11 +1113,14 @@ 2.211 gotcdfile isolinux.cfg 2.212 parse_isolinux < $file > /tmp/var$$ 2.213 . /tmp/var$$ 2.214 + for i in $media/$KERNEL $(dirname $file)/$KERNEL $media/$(locase $KERNEL) \ 2.215 + $(dirname $file)/$(locase $KERNEL); do 2.216 + [ -s $i ] && KERNEL=$i && break 2.217 + done 2.218 rm -f /tmp/var$$ 2.219 - [ -e /media/cdrom/$KERNEL ] || KERNEL=$(locase $KERNEL) 2.220 - [ $(get 514 /media/cdrom/$KERNEL 4) -eq 1400005704 ] || return 2.221 - n=$(($(get 497 /media/cdrom/$KERNEL 1)+1)) 2.222 - ddq bs=512 count=$n if=/media/cdrom/$KERNEL of=/tmp/fd$$ 2.223 + [ $(get 514 $KERNEL 4) -eq 1400005704 ] || return 2.224 + n=$(($(get 497 $KERNEL 1)+1)) 2.225 + ddq bs=512 count=$n if=$KERNEL of=/tmp/fd$$ 2.226 uudecode <<EOT | ddq of=/tmp/fd$$ conv=notrunc 2.227 bootloader 2.228 EOT 2.229 @@ -1132,21 +1131,24 @@ 2.230 bs=1 seek=497 count=1 of=/tmp/fd$$ 2.231 words2bin $pos | ddq conv=notrunc \ 2.232 bs=1 seek=34 count=2 of=/tmp/fd$$ 2.233 - [ $(get 518 /media/cdrom/$KERNEL 4) -ge 514 ] && 2.234 + [ $(get 518 $KERNEL 4) -ge 514 ] && 2.235 words2bin 32768 9 | ddq conv=notrunc \ 2.236 bs=1 seek=552 count=4 of=/tmp/fd$$ 2.237 fi 2.238 syssize=$(echo $(get 500 /tmp/fd$$ 4)) 2.239 - ddq bs=512 skip=$n if=/media/cdrom/$KERNEL | cat - /dev/zero | \ 2.240 + ddq bs=512 skip=$n if=$KERNEL | cat - /dev/zero | \ 2.241 ddq bs=512 count=$((($syssize+31)/32)) conv=sync >> /tmp/fd$$ 2.242 base=$(stat -c %s /tmp/fd$$) 2.243 len= 2.244 if [ "$INITRD" ]; then 2.245 l=0 2.246 for i in ${INITRD//,/ }; do 2.247 - [ -e /media/cdrom/$i ] || i=$(locase $i) 2.248 - ddq if=/media/cdrom/$i >> /tmp/fd$$ 2.249 - l=$(($l+$(stat -c %s /media/cdrom/$i))) 2.250 + for j in $media/$i $(dirname $KERNEL)/$i $media/$(locase $i) \ 2.251 + $(dirname $KERNEL)/$(locase $i); do 2.252 + [ -s $j ] && i=$j && break 2.253 + done 2.254 + ddq if=$i >> /tmp/fd$$ 2.255 + l=$(($l+$(stat -c %s $i))) 2.256 r=$((4 - ($l % 4))) 2.257 if [ $r -ne 4 ]; then 2.258 ddq if=/dev/zero bs=1 count=$r >> /tmp/fd$$ 2.259 @@ -1201,13 +1203,16 @@ 2.260 2.261 quit() 2.262 { 2.263 - umount -d /media/cdrom 2.264 - exit 2.265 + umount -d $media 2.266 + rmdir $media 2.267 + ${1:-exit} 2.268 } 2.269 2.270 ISO="${1:-/dev/null}" 2.271 [ -z "$(isiso 2> /dev/null)" ] && echo "Usage : $0 file.iso" && exit 1 2.272 -mount -o loop,ro $ISO /media/cdrom 2.273 +media=/tmp/madia$$ 2.274 +mkdir -p $media 2.275 +mount -o loop,ro $ISO $media 2.276 2.277 if [ "$2" == "list" ]; then 2.278 sed '/^\$(.*") \\/!d;s/^\$(\(.*\)").*/\1"/' $0 | while read line; do 2.279 @@ -1231,8 +1236,8 @@ 2.280 while true; do 2.281 cat > /tmp/dialog$$ <<EOT 2.282 $DIALOG --clear \ 2.283 - --title " SliTaz ISO tool " \ 2.284 - --menu "" 23 70 17 \ 2.285 + --title " $(basename $ISO) $(stat -c %y $media/. | sed 's/ .*//') " \ 2.286 + --menu "" -2 70 0 \ 2.287 $(cdfile 'README*' "readme" "Show the README file") \ 2.288 $(gotisomd5 "isomd5" "Check the ISO image") \ 2.289 $(cdfile 'md5sum*' "md5" "Check the ISO files") \
3.1 --- a/tazpanel/receipt Sun Jul 26 17:30:32 2015 +0200 3.2 +++ b/tazpanel/receipt Tue Jul 28 08:46:03 2015 +0200 3.3 @@ -13,8 +13,8 @@ 3.4 HOST_ARCH="i486 arm" 3.5 3.6 SUGGESTED="tazinst-gui tazinst" 3.7 -DEPENDS="busybox" 3.8 -BUILD_DEPENDS="" 3.9 +DEPENDS="busybox gettext-base" 3.10 +BUILD_DEPENDS="gettext" 3.11 3.12 # Rules to configure and make the package. 3.13 compile_rules()