wok-current rev 23831
syslinux/iso2exe: fix loram case
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 31 14:59:28 2020 +0000 (2020-05-31) |
parents | e372913c6d18 |
children | 6f23fb91aeaa |
files | syslinux/stuff/iso2exe/init syslinux/stuff/iso2exe/taziso |
line diff
1.1 --- a/syslinux/stuff/iso2exe/init Sun May 31 10:20:05 2020 +0000 1.2 +++ b/syslinux/stuff/iso2exe/init Sun May 31 14:59:28 2020 +0000 1.3 @@ -7,7 +7,6 @@ 1.4 1.5 myget() 1.6 { 1.7 - od -v -j $1 -N ${4:-${3:-2}} -t u${3:-2} -w${3:-2} -An $2 2>/dev/null || 1.8 hexdump -v -s $1 -n ${4:-${3:-2}} -e "\"\" 1/${3:-2} \" %u\n\"" $2 1.9 } 1.10 1.11 @@ -91,7 +90,7 @@ 1.12 ln -s $media/fs /sqfs 1.13 else 1.14 mkdir /sqfs 1.15 - losetup -o 124 /dev/loop6 $(ls_r $media/boot/rootfs?*.* | sed q) 1.16 + losetup -o 124 /dev/loop6 $(ls -r $media/boot/rootfs?*.* | sed q) 1.17 mount -r /dev/loop6 /sqfs 1.18 fi 1.19 cp -a /sqfs/dev/fuse /sqfs/dev/tty[12] /sqfs/dev/[hs]d* /dev 1.20 @@ -119,12 +118,13 @@ 1.21 umount_proc 1.22 } 1.23 1.24 +xhascustomconf=false 1.25 text() 1.26 { 1.27 - $uncpio $(ls_r $media/boot/rootfs?*.* | sed q) 1.28 + $uncpio $(ls -r $media/boot/rootfs?*.* | sed q) 1.29 init= 1.30 cmdline="$(cat /proc/cmdline)" 1.31 - if hascustomconf; then 1.32 + if $xhascustomconf 2> /dev/null; then 1.33 getcustomconf /tmp > /dev/null 1.34 [ -s /tmp/cmdline ] && 1.35 cmdline="$cmdline $(cat /tmp/cmdline)" && 1.36 @@ -136,11 +136,12 @@ 1.37 exec ${init:-/init} $cmdline 1.38 } 1.39 1.40 +xdowait=echo 1.41 live() 1.42 { 1.43 n=0 1.44 - dotwait "Extract filesystem..." 1.45 - for i in $(ls_r $media/boot/rootfs*); do 1.46 + $xdotwait "Extract filesystem..." 1.47 + for i in $(ls -r $media/boot/rootfs*); do 1.48 [ $((n++)) -eq 0 ] || $uncpio $i 1.49 done 1.50 rm -f /tmp/wait
2.1 --- a/syslinux/stuff/iso2exe/taziso Sun May 31 10:20:05 2020 +0000 2.2 +++ b/syslinux/stuff/iso2exe/taziso Sun May 31 14:59:28 2020 +0000 2.3 @@ -1,6 +1,6 @@ 2.4 #!/bin/sh 2.5 2.6 -[ $(id -u) -eq 0 ] || exec su -c "$0 $@" 2.7 +[ 0$(id -u 2>/dev/null) -eq 0 ] || exec su -c "$0 $@" 2.8 2.9 DIALOG=dialog 2.10 2.11 @@ -11,7 +11,6 @@ 2.12 2.13 get() 2.14 { 2.15 - od -v -j $1 -N ${4:-${3:-2}} -t u${3:-2} -w${3:-2} -An "$2" 2>/dev/null || 2.16 hexdump -v -s $1 -n ${4:-${3:-2}} -e "\"\" 1/${3:-2} \" %u\n\"" "$2" 2.17 } 2.18 2.19 @@ -58,6 +57,7 @@ 2.20 esac < $i | ( cd ${2:-/} ; cpio -idmu > /dev/null 2>&1 ) 2.21 } 2.22 2.23 +xdotwait=dotwait 2.24 dotwait() 2.25 { 2.26 echo -n "${1:-Install filesystem}.." 2.27 @@ -929,6 +929,7 @@ 2.28 hascustomconf $(($c+16)) && echo $(($c+16)) || echo $c 2.29 } 2.30 2.31 +xhascustomconf=hascustomconf 2.32 hascustomconf() 2.33 { 2.34 [ "$(ddq bs=2k skip=${1:-$(customsector)} if="$ISO" | ddq bs=1 count=6)" \ 2.35 @@ -1158,7 +1159,7 @@ 2.36 2.37 hasflavinfo() 2.38 { 2.39 - [ "$(flavdata | ddq bs=1 count=7 | strings)" = \ 2.40 + [ "$(flavdata | ddq bs=1 count=7)" = \ 2.41 "0707010" ] && menuitem "$@" 2.42 } 2.43