[Fai-commit] r6291 - in trunk/examples/simple: files/boot/grub/menu.lst scripts/CENTOS scripts/DEBIAN scripts/FAIBASE scripts/GRUB scripts/GRUB_PC scripts/LAST

Holger Levsen holger at layer-acht.org
Sat Feb 12 19:30:04 CET 2011


Hi,

On Samstag, 12. Februar 2011, Thomas Lange wrote:
> Author: lange
> Date: 2011-02-12 17:53:27 +0000 (Sat, 12 Feb 2011)
> New Revision: 6291
>
> Modified:
>    trunk/examples/simple/files/boot/grub/menu.lst/postinst
>    trunk/examples/simple/scripts/CENTOS/10-security
>    trunk/examples/simple/scripts/CENTOS/30-mkinitrd
>    trunk/examples/simple/scripts/CENTOS/40-install-grub
>    trunk/examples/simple/scripts/DEBIAN/10-keymap
>    trunk/examples/simple/scripts/DEBIAN/10-rootpw
>    trunk/examples/simple/scripts/DEBIAN/30-interface
>    trunk/examples/simple/scripts/DEBIAN/40-misc
>    trunk/examples/simple/scripts/FAIBASE/10-misc
>    trunk/examples/simple/scripts/GRUB/10-setup
>    trunk/examples/simple/scripts/GRUB/20-initramfs
>    trunk/examples/simple/scripts/GRUB_PC/10-setup
>    trunk/examples/simple/scripts/LAST/50-misc
> Log:
> new code for trap ERR, it now saves the maximum value of all errors
>
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error
> -error=0 ; trap "error=$((error|1))" ERR
> +error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error

this screams "use a shell function and include it everywhere" to me.


cheers,
	Holger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20110212/3abe0150/attachment.bin>


More information about the linux-fai mailing list