wok diff syslinux/stuff/tools/isohybrid.sh @ rev 10736
lxpanel: fix logout command and clean *deps
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 29 14:51:18 2011 +0200 (2011-05-29) |
parents | f25f2e389934 |
children | 2188bfc43e67 |
line diff
1.1 --- a/syslinux/stuff/tools/isohybrid.sh Sat Feb 05 19:51:54 2011 +0100 1.2 +++ b/syslinux/stuff/tools/isohybrid.sh Sun May 29 14:51:18 2011 +0200 1.3 @@ -19,21 +19,23 @@ 1.4 offset=0 1.5 partok=0 1.6 hd0=0 1.7 +always=0 1.8 1.9 while [ -n "$1" ]; do 1.10 - case "$1" in 1.11 - -ct*) hd0=2;; 1.12 - -e*|--e*) entry=$2; shift;; 1.13 - -f*) hd0=1;; 1.14 - -h) heads=$2; shift;; 1.15 - -i|--i*) id=$(($2)); shift;; 1.16 - -noh*) hd0=0;; 1.17 - -nop*) partok=0;; 1.18 - -o*|--o*) offset=$(($2)); shift;; 1.19 - -p*) partok=1;; 1.20 - -s) sectors=$2; shift;; 1.21 - -t*|--t*) partype=$(($2 & 255)); shift;; 1.22 - *) iso=$1;; 1.23 + case "${1/--/-}" in 1.24 + -a*) always=1;; 1.25 + -ct*) hd0=2;; 1.26 + -e*) entry=$2; shift;; 1.27 + -f*) hd0=1;; 1.28 + -h) heads=$2; shift;; 1.29 + -i*) id=$(($2)); shift;; 1.30 + -noh*) hd0=0;; 1.31 + -nop*) partok=0;; 1.32 + -o*) offset=$(($2)); shift;; 1.33 + -p*) partok=1;; 1.34 + -s) sectors=$2; shift;; 1.35 + -t*) partype=$(($2 & 255)); shift;; 1.36 + *) iso=$1;; 1.37 esac 1.38 shift 1.39 done 1.40 @@ -51,6 +53,7 @@ 1.41 --forcehd0 Assume we are loaded as disk ID 0 1.42 --ctrlhd0 Assume disk ID 0 if the Ctrl key is pressed 1.43 --partok Allow booting from within a partition 1.44 + --always Do not abort on errors 1.45 EOT 1.46 exit 1 1.47 fi 1.48 @@ -74,9 +77,9 @@ 1.49 # write a 32 bits data 1.50 store32() 1.51 { 1.52 - n=$2; i=4; while [ $i -ne 0 ]; do 1.53 + n=$2; for i in 1 2 3 4; do 1.54 printf '\\\\x%02X' $(($n & 255)) 1.55 - i=$(($i-1)); n=$(($n >> 8)) 1.56 + n=$(($n >> 8)) 1.57 done | xargs echo -en | ddq bs=1 conv=notrunc of=$iso seek=$(($1)) 1.58 } 1.59 1.60 @@ -99,7 +102,7 @@ 1.61 abort() 1.62 { 1.63 echo "$iso: $1" 1.64 - exit 1 1.65 + [ $always -eq 0 ] && exit 1 1.66 } 1.67 1.68 [ "$(readiso 17 7 23)" == "EL TORITO SPECIFICATION" ] ||