wok-current diff syslinux/stuff/iso2exe/init @ rev 25733
Accept licence PyQt-x11-gpl, bump firmware* to 20240610, build imagemagick (merge)
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Dec 20 16:13:23 2024 +0000 (2 weeks ago) |
parents | 8eaf1d9eb640 |
children |
line diff
1.1 --- a/syslinux/stuff/iso2exe/init Tue Nov 09 17:05:26 2021 +0000 1.2 +++ b/syslinux/stuff/iso2exe/init Fri Dec 20 16:13:23 2024 +0000 1.3 @@ -11,11 +11,11 @@ 1.4 { 1.5 mkdir -p $media 1.6 for bdev in /sys/block/*; do 1.7 - for dev in $(ls -d $bdev/$(basename $bdev)*); do 1.8 + for dev in $(ls -d $bdev/${bdev##*/}*); do 1.9 [ "$dev" ] || continue 2 1.10 - mount /dev/$(basename $dev) $mnt 1.11 - if [ -s $mnt/$ISO ] && [ $(getarg magic) = $(hexdump -v -s 18 -n 2 -e "\"\" 1/2 \" %u\n\"" $mnt/$ISO) ]; then 1.12 - echo "Found $ISO on $(basename $dev)" 1.13 + mount /dev/${dev##*/} $mnt 1.14 + if [ -s $mnt/$ISO ] && [ $(getarg magic) = $(hexdump -vs18 -n2 -e "\"\" 1/2 \" %u\n\"" $mnt/$ISO) ]; then 1.15 + echo "Found $ISO on ${dev##*/}" 1.16 ISO=$mnt/$ISO 1.17 mount -o loop,ro $ISO $media 1.18 return 1.19 @@ -30,15 +30,15 @@ 1.20 uncpio64() 1.21 { 1.22 i=$1 1.23 - grep ' lm ' /proc/cpuinfo && [ -s ${i}64 ] && i=${i}64 1.24 + grep -q ' lm ' /proc/cpuinfo && [ -s ${i}64 ] && i=${i}64 1.25 [ -s "$i" ] || return 1.26 - echo -en "\n Extracting $(basename $i) ..." 1.27 + echo -en "\n Extracting ${i##*/} ..." 1.28 case $(get 0 $i) in 1.29 *35615) ( zcat || gunzip );; 1.30 *14333) unxz;; 1.31 *\ 93) unlzma;; 1.32 *) cat;; 1.33 - esac < $i | ( cd ${2:-/}; cpio -idmu > /dev/null 2>&1 ) 1.34 + esac < $i | ( cd ${2:-/}; cpio -idmu >/dev/null 2>&1 ) 1.35 } 1.36 1.37 tty0=tty0 1.38 @@ -77,8 +77,8 @@ 1.39 [ -d /etc/skel ] || $uncpio $(ls -r $media/boot/rootfs?*.* | sed q) 1.40 init= 1.41 cmdline="$(cat /proc/cmdline)" 1.42 - if $xhascustomconf 2> /dev/null; then 1.43 - getcustomconf /tmp > /dev/null 1.44 + if $xhascustomconf 2>/dev/null; then 1.45 + getcustomconf /tmp >/dev/null 1.46 [ -s /tmp/cmdline ] && 1.47 cmdline="$cmdline $(cat /tmp/cmdline)" && 1.48 init="$(sed '/rdinit=/!d;s/.*rdinit=\([^ ]*\).*/\1/' /tmp/cmdline)" 1.49 @@ -131,7 +131,7 @@ 1.50 mount -t proc /proc /proc 1.51 mount -t sysfs /sys /sys 1.52 udevd --daemon 2>/dev/null && udevadm trigger && sleep 5 1.53 -mdev -s 2> /dev/null || 1.54 +mdev -s 2>/dev/null || 1.55 for i in /sys/block/*/dev /sys/block/*/*/dev; do 1.56 [ -s "$i" ] || continue 1.57 n=${i%/dev} 1.58 @@ -142,7 +142,7 @@ 1.59 ISO="$(getarg iso | sed 's/.://;s|\\|/|g')" 1.60 getiso 2>/dev/null || text 1.61 if [ -s /lib/modules/squashfs.ko* ]; then 1.62 - insmod /lib/modules/squashfs.ko* 2>/dev/null 1.63 + insmod /lib/modules/squashfs.ko* 1.64 if [ -d $media/fs ]; then 1.65 ln -s $media/fs /sqfs 1.66 else 1.67 @@ -152,9 +152,9 @@ 1.68 fi 1.69 cp -a /sqfs/dev/fuse /sqfs/dev/tty[12] /dev 1.70 for i in /sqfs/dev/* ; do [ -b $i ] && cp -a $i /dev ; done 1.71 - ln -s /sqfs/lib/* lib 2>/dev/null 1.72 + ln -s /sqfs/lib/* lib 1.73 ln -fs /sqfs/usr /sqfs/var / 1.74 - mkdir /etc && cp /sqfs/etc/dialogrc /etc 2>/dev/null 1.75 -fi 1.76 + mkdir /etc && cp /sqfs/etc/dialogrc /etc 1.77 +fi 2>/dev/null 1.78 [ -s /usr/bin/taziso ] || live 1.79 . /usr/bin/taziso