From: Alan Dunn Date: Wed, 2 Mar 2016 16:59:04 +0000 (-0800) Subject: discover/grub2: Do not set $0 in functions X-Git-Tag: v1.0.1~1 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=c5cbcf4b6a2ee7dafba8d29d52071752f3022ebb;hp=c5cbcf4b6a2ee7dafba8d29d52071752f3022ebb discover/grub2: Do not set $0 in functions GRUB2 does not set $0 in functions, so don't set it in our GRUB2 script parser. (As it doesn't have a value in GRUB2 scripts, probably no GRUB2 script depends on the value of $0.) Additionally, dash and bash set environment variable 0 to the name of the script (even in functions), so the current behavior of $0 doesn't really match shell scripts either. Tested: Existing tests pass. Signed-off-by: Alan Dunn Signed-off-by: Samuel Mendoza-Jonas ---