wok diff syslinux/stuff/iso2exe/init @ rev 20771
cpige: add man page for cook.slitaz.org
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 13 16:56:42 2019 +0100 (2019-02-13) |
parents | 48ae45dab042 |
children | c89d25976dbe |
line diff
1.1 --- a/syslinux/stuff/iso2exe/init Wed Feb 13 11:08:54 2019 +0100 1.2 +++ b/syslinux/stuff/iso2exe/init Wed Feb 13 16:56:42 2019 +0100 1.3 @@ -70,7 +70,7 @@ 1.4 --menu|--radiolist) 1.5 [ "$1" == "--menu" ] && shft=2 || shft=3 1.6 label="" 1.7 - [ "$2" ] && label="\n$2" 1.8 + [ "$2" ] && label="\n$2" 1.9 shift 5 1.10 echo -e "$title$label\n0 Cancel" > /tmp/data 1.11 n=1 1.12 @@ -372,19 +372,17 @@ 1.13 1.14 install() 1.15 { 1.16 - $DIALOG --clear \ 1.17 - --title " SliTaz UMSDOS way installation " \ 1.18 + $DIALOG --clear --title " SliTaz UMSDOS way installation " \ 1.19 --yes-label "Install" --yesno \ 1.20 "\nSliTaz will be installed in the subdirectory \\slitaz of the current 1.21 DOS/Windows partition. You will see your files from /mnt/dos.\n\n 1.22 You can start SliTaz with \\slitaz\\boot\\tazboot.exe\n\n 1.23 To uninstall SliTaz, you have only to remove this directory. 1.24 The file \\boot.ini or \\config.sys may be modified too.\n\n 1.25 -SliTaz may run slowly on the 'UMSDOS way' installation due to the 1.26 +SliTaz may run slowly on the 'UMSDOS way' installation due to the 1.27 posixovl filesystem. The 'TAZUSB way' installation runs faster.\n\n 1.28 To do a traditional installation with disk partitioning, 1.29 -start SliTaz Live with the 'SliTaz RAM boot' menu.\n 1.30 -" 19 70 1.31 +start SliTaz Live with the 'SliTaz RAM boot' menu.\n" 19 70 1.32 [ $? -eq 0 ] || return 1.33 doinstall || return 1.34 [ -x /mnt/slitaz/sbin/init ] || return 1.35 @@ -395,8 +393,7 @@ 1.36 1.37 installtaz() 1.38 { 1.39 - $DIALOG --clear \ 1.40 - --title " SliTaz TAZUSB way installation " \ 1.41 + $DIALOG --clear --title " SliTaz TAZUSB way installation " \ 1.42 --yes-label "Install" --yesno \ 1.43 "\nSliTaz will be installed in the subdirectory \\slitaz of the current 1.44 DOS/Windows partition. You will see your files from /mnt/dos.\n\n 1.45 @@ -406,11 +403,10 @@ 1.46 The filesystem is loaded entirely into memory upon boot to 1.47 increase responsiveness. Only /home lands on the hard disk.\n\n 1.48 To do a traditional installation with disk partitioning, 1.49 -start SliTaz Live with the 'SliTaz RAM boot' menu.\n 1.50 -" 19 70 1.51 +start SliTaz Live with the 'SliTaz RAM boot' menu.\n" 19 70 1.52 [ $? -eq 0 ] || return 1.53 doinstall tazusblike || return 1.54 - dotwait 1.55 + dotwait 1.56 if [ -d /media/cdrom/fs ]; then 1.57 cp -a /media/cdrom/fs/. / 1.58 else 1.59 @@ -433,13 +429,12 @@ 1.60 1.61 tazboot() 1.62 { 1.63 - $DIALOG --clear \ 1.64 - --title " SliTaz bootloader for DOS " \ 1.65 + $DIALOG --clear --title " SliTaz bootloader for DOS " \ 1.66 --yes-label "Install" --yesno \ 1.67 "\nThe file TAZBOOT.EXE will be created in the top directory. It supports 1.68 any linux kernel, multiple initramfs, a kernel command line and 1.69 an ISO image file loopback (retrieves files from an ISO file).\n\n 1.70 -Usage: tazboot.exe [[@commands]|[kernel=<bzimage>] 1.71 +Usage: tazboot.exe [[@commands]|[kernel=<bzimage>] 1.72 [initrd=<rootfs>[,<rootfs2>...]] [bootfrom=<isofile>] cmdline args ...]\n\n 1.73 Defaults: tazboot @tazboot.cmd or tazboot kernel=bzImage auto\n\n\ 1.74 Examples for tazboot.cmd:\n\n\ 1.75 @@ -448,8 +443,7 @@ 1.76 initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz\n\ 1.77 rw root=/dev/null autologin\n\n\ 1.78 kernel=\\slitaz\\vmlinuz root=/dev/sda5 ro\n\n 1.79 -Unlike GRUB4DOS, it doesn't require unfragmented ISO image files.\n 1.80 -" 24 78 1.81 +Unlike GRUB4DOS, it doesn't require unfragmented ISO image files.\n" 24 78 1.82 [ $? -eq 0 ] || return 1.83 gettazboot /mnt/tazboot.exe 1.84 } 1.85 @@ -459,9 +453,7 @@ 1.86 dotwait "Checking files" 1.87 ( cd /media/cdrom ; ${1:-md5sum -c md5sum*} | sort ) > /tmp/data 1.88 rm -f /tmp/wait 1.89 - $DIALOG --clear \ 1.90 - --title " Checked files " \ 1.91 - --textbox /tmp/data 24 78 1.92 + $DIALOG --clear --title " Checked files " --textbox /tmp/data 24 78 1.93 rm -f /tmp/data 1.94 } 1.95 1.96 @@ -484,22 +476,18 @@ 1.97 readme() 1.98 { 1.99 gotcdfile "README*" 1.100 - $DIALOG --clear \ 1.101 - --title " Readme " \ 1.102 - --textbox $file 24 78 1.103 + $DIALOG --clear --title " Readme " --textbox $file 24 78 1.104 } 1.105 1.106 bootlog() 1.107 { 1.108 - $DIALOG --clear \ 1.109 - --title " Linux boot messages " \ 1.110 + $DIALOG --clear --title " Linux boot messages " \ 1.111 --textbox /tmp/dmesg 24 78 1.112 } 1.113 1.114 bzimage() 1.115 { 1.116 - $DIALOG --clear \ 1.117 - --title " Create linux.exe ? " \ 1.118 + $DIALOG --clear --title " Create linux.exe ? " \ 1.119 --yes-label "Install" --yesno \ 1.120 "\nLinux.exe launches the linux kernel under DOS (in real mode only). 1.121 The cmdline arguments are supported except initrd=, 1.122 @@ -512,13 +500,11 @@ 1.123 1.124 memtest() 1.125 { 1.126 - $DIALOG --clear \ 1.127 - --title " Create memtest.exe ? " \ 1.128 + $DIALOG --clear --title " Create memtest.exe ? " \ 1.129 --yes-label "Install" --yesno \ 1.130 "\nMemtest86 is a thorough, stand alone memory test for x86 architecture 1.131 computers. BIOS based memory tests are a quick, cursory check and often 1.132 -miss many of the failures that are detected by Memtest86.\n 1.133 -" 12 70 1.134 +miss many of the failures that are detected by Memtest86.\n" 12 70 1.135 [ $? -eq 0 ] && gotcdfile "memtest*" && cp $file /mnt/memtest.exe 1.136 } 1.137 1.138 @@ -556,49 +542,43 @@ 1.139 1.140 fdmemtest() 1.141 { 1.142 - $DIALOG --clear \ 1.143 - --title " Create a Memtest86 boot floppy " \ 1.144 + $DIALOG --clear --title " Create a Memtest86 boot floppy " \ 1.145 --yes-label "Create floppy" --yesno \ 1.146 "\nMemtest86 is a thorough, stand alone memory test for x86 architecture 1.147 computers. BIOS based memory tests are a quick, cursory check and often 1.148 miss many of the failures that are detected by Memtest86.\n\n 1.149 -Please insert a blank disk in floppy drive.\n 1.150 -" 12 70 1.151 +Please insert a blank disk in floppy drive.\n" 12 70 1.152 [ $? -eq 0 ] && gotcdfile "memtest*" && mkfloppy $file 1.153 } 1.154 1.155 pxe() 1.156 { 1.157 gotcdfile "?pxe*" 1.158 - $DIALOG --clear \ 1.159 - --title " Create $(basename $file).exe ? " \ 1.160 + $DIALOG --clear --title " Create $(basename $file).exe ? " \ 1.161 --yes-label "Install" --yesno \ 1.162 "\nBoot your operating system from the internet and enjoy a full system 1.163 working entirely in RAM with speed and stability in mind. The Linux Kernel 1.164 and the complete SliTaz compressed root filesystem will be loaded into RAM 1.165 -from the Web using PXE and HTTP protocols.\n 1.166 -" 12 70 1.167 +from the Web using PXE and HTTP protocols.\n" 12 70 1.168 [ $? -eq 0 ] || return 1.169 cp $file /mnt/$(basename $file).exe 1.170 } 1.171 1.172 fdpxe() 1.173 { 1.174 - $DIALOG --clear \ 1.175 - --title " Create a SliTaz Web boot floppy " \ 1.176 + $DIALOG --clear --title " Create a SliTaz Web boot floppy " \ 1.177 --yes-label "Create floppy" --yesno \ 1.178 "\nBoot your operating system from the internet and enjoy a full system 1.179 working entirely in RAM with speed and stability in mind. The Linux Kernel 1.180 and the complete SliTaz compressed root filesystem will be loaded into RAM 1.181 from the Web using PXE and HTTP protocols.\n\n 1.182 -Please insert a blank disk in floppy drive.\n 1.183 -" 12 70 1.184 +Please insert a blank disk in floppy drive.\n" 12 70 1.185 [ $? -eq 0 ] && gotcdfile "?pxe*" && mkfloppy $file 1.186 } 1.187 1.188 gotposixovl() 1.189 { 1.190 - mount.posixovl 2>&1 | grep -qi usage && 1.191 + mount.posixovl 2>&1 | grep -qi usage && 1.192 echo -en "\"$1\" \"$2\"" 1.193 } 1.194 1.195 @@ -640,7 +620,7 @@ 1.196 1.197 fddata() 1.198 { 1.199 - [ -e /sys/block/fd0 ] && 1.200 + [ -e /sys/block/fd0 ] && 1.201 [ $(get 26 /mnt/$ISO 1 2> /dev/null || echo 0) -ne 0 ] && 1.202 echo -en "\"$1\" \"$2\"" 1.203 } 1.204 @@ -707,7 +687,7 @@ 1.205 ddq bs=1 count=$(($cnt % 512)); } > initrd && 1.206 ls -l initrd 1.207 break ;; 1.208 - *) break ;; 1.209 + *) break ;; 1.210 esac 1.211 done 1.212 cd - > /dev/null 1.213 @@ -747,7 +727,7 @@ 1.214 ddq bs=512 count=$((cnt / 512)) 1.215 ddq bs=1 count=$((cnt % 512)) 1.216 break ;; 1.217 - *) break ;; 1.218 + *) break ;; 1.219 esac 1.220 done | md5sum | cut -c1-32)" 1.221 [ "$md5" == "$(cat $TMP)" ] && echo "OK" || echo "ERROR" 1.222 @@ -761,6 +741,7 @@ 1.223 if [ "$1" == "--build" ]; then #install-begin 1.224 cp $0 $0.tmp 1.225 uuencode -m - < ifmem.bin | sed -e 's|^[ \t]*||;s|[ \t]*###.*||' \ 1.226 + -e 's| *;;|;;|;s|\t\t*|\t|g' \ 1.227 -e '/^ifmemcode$/r/dev/stdin' -e '/^ifmemcode$/d' -i $0.tmp 1.228 uuencode -m - < bootloader.bin | sed -e '/^bootloader$/r/dev/stdin' \ 1.229 -e '/^bootloader$/d' -e '/install-begin$/,/install-end$/d' -i $0.tmp 1.230 @@ -831,7 +812,7 @@ 1.231 $(dirname $file)/$(locase $KERNEL); do 1.232 [ -s $i ] && KERNEL=$i && break 1.233 done 1.234 - rm -f /tmp/var$$ 1.235 + rm -f /tmp/var$$ 1.236 [ $(get 514 $KERNEL 4) -eq 1400005704 ] || return 1.237 n=$(($(get 497 $KERNEL 1)+1)) 1.238 ddq bs=512 count=$n if=$KERNEL of=/tmp/fd$$ 1.239 @@ -919,13 +900,11 @@ 1.240 fdbootstrap() 1.241 { 1.242 sz=$((512 * $(echo $(get 26 /mnt/$ISO 1)))) 1.243 - $DIALOG --clear \ 1.244 - --title " Create a floppy bootstrap " \ 1.245 + $DIALOG --clear --title " Create a floppy bootstrap " \ 1.246 --yes-label "Continue" --yesno \ 1.247 "\nThe floppy will install a driver to access the ISO file 1.248 -on your hard disk and will emulate a CD-ROM during the boot process.\n\n 1.249 -Please insert a floppy in drive now.\n 1.250 -" 10 70 1.251 +on your hard disk and will emulate a CD-ROM during the boot process.\n\n 1.252 +Please insert a floppy in drive now.\n" 10 70 1.253 [ $? -eq 0 ] || return 1.254 ddq if=/mnt/$ISO of=/tmp/bootiso bs=1 count=512 \ 1.255 skip=$(( $(get 64 /mnt/$ISO) - $sz )) 1.256 @@ -946,8 +925,7 @@ 1.257 grep -qs 1 /sys/block/$DEV/ro && return 1.258 [ "$DEV" ] || return 1.259 cat > /tmp/dialog <<EOT 1.260 -$DIALOG --clear \ 1.261 - --title " Select your USB key " \ 1.262 +$DIALOG --clear --title " Select your USB key " \ 1.263 --menu "\nPlease select the USB key according to its known size.\n\n" \ 1.264 14 70 4 \ 1.265 $(for i in $DEV ; do 1.266 @@ -970,21 +948,19 @@ 1.267 1.268 usbbootkey() 1.269 { 1.270 - $DIALOG --clear \ 1.271 - --title " Create a USB boot key " \ 1.272 + $DIALOG --clear --title " Create a USB boot key " \ 1.273 --yes-label "Continue" --yesno \ 1.274 "\nThe USB key will be used like a CD-ROM. You will not be able to write 1.275 any data on the boot partition.\n\n 1.276 An extra FAT32 partition will be created with the remaining free space.\n\n 1.277 -$(tazusbmsg)Please plug your USB stick in now.\n 1.278 -" 16 70 1.279 +$(tazusbmsg)Please plug your USB stick in now.\n" 16 70 1.280 [ $? -eq 0 ] || return 1.281 usbdev || return 1.282 1.283 ### perform dd in progress bar 1.284 max=$(($(cat /sys/block/loop0/size)/2048)) 1.285 - i=0; ddq if=/mnt/$ISO bs=1024k | ( 1.286 - while ddq bs=1024k count=1 ; do 1.287 + i=0; ddq if=/mnt/$ISO bs=1024k | ( 1.288 + while ddq bs=1024k count=1 ; do 1.289 i=$(($i + 1)) 1.290 [ $i -gt $max ] && break 1.291 echo $((($i*100)/$max)) | dialog --gauge \ 1.292 @@ -1020,26 +996,23 @@ 1.293 1.294 usbkey() 1.295 { 1.296 - $DIALOG --clear \ 1.297 - --title " Create a SliTaz USB key " \ 1.298 + $DIALOG --clear --title " Create a SliTaz USB key " \ 1.299 --yes-label "Continue" --yesno \ 1.300 "\nUnlike a hard drive install, the filesystem is kept in a compressed 1.301 rootfs.gz. The filesystem is loaded entirely into memory upon boot. 1.302 This should increase responsiveness, protect the filesystem against 1.303 accidental corruption and reduce read/writes to the USB drive. 1.304 Once setup, the tazusb utility can rewrite the root filesystem 1.305 -with any changes you have made since booting up, 1.306 +with any changes you have made since booting up, 1.307 giving the effective benefits of a hard drive install.\n\n 1.308 /home is mounted on boot using the UUID of your particular flash drive. 1.309 Unlike a device name, the UUID has the benefit of never changing from machine 1.310 to machine.\n\n 1.311 -Please plug your USB stick in now.\n 1.312 -" 19 70 1.313 +Please plug your USB stick in now.\n" 19 70 1.314 [ $? -eq 0 ] || return 1.315 usbdev || return 1.316 exec 3>&1 1.317 - format=`$DIALOG --clear \ 1.318 - --title " Select the filesystem " \ 1.319 + format=`$DIALOG --clear --title " Select the filesystem " \ 1.320 --radiolist "\nPlease select the filesystem type to create.\n\n\ 1.321 The filesystem creation will erase all the data \ 1.322 in the USB key." 14 70 4 \ 1.323 @@ -1171,9 +1144,7 @@ 1.324 echo "=== extra ${i#*list} files" 1.325 cat $i 1.326 done >> $file 1.327 - $DIALOG --clear \ 1.328 - --title " Flavor info " \ 1.329 - --textbox $file 24 78 1.330 + $DIALOG --clear --title " Flavor info " --textbox $file 24 78 1.331 rm -rf /tmp/data 1.332 } 1.333 1.334 @@ -1189,7 +1160,7 @@ 1.335 1.336 shell() 1.337 { 1.338 - trap text 2 1.339 + trap text 2 1.340 getty -n -l /bin/ash 38400 tty1 || sh 1.341 } 1.342 1.343 @@ -1218,12 +1189,11 @@ 1.344 isotitle="$(blkid /mnt/$ISO | sed 's/.*LABEL="\([^"]*\).*/\1/') $(stat \ 1.345 -c %y /media/cdrom | sed 's/ .*//') $(basename $ISO)" 1.346 while true; do 1.347 - trap shell 2 1.348 + trap shell 2 1.349 keymap="$(cat /etc/keymap.conf 2> /dev/null)" 1.350 locale="$(sed '/^LANG=/!d;s/.*=//' /etc/locale.conf 2> /dev/null)" 1.351 cat > /tmp/dialog <<EOT 1.352 -$DIALOG --clear \ 1.353 - --title " ${isotitle:-Welcome to Linux} " \ 1.354 +$DIALOG --clear --title " ${isotitle:-Welcome to Linux} " \ 1.355 --menu "" 23 70 17 \ 1.356 $(xfile tazkeymap "tazkeymap" "Select keyboard (${keymap:-none})") \ 1.357 $(xfile tazlocale "tazlocale" "Select locale (${locale:-none})") \