![]() Bash 5 apparently longer propagates variable assignments to local variables in front of function calls when in POSIX mode: [lkundrak@demiurge ~]$ cat feh.sh print_VAR () { echo "$VAR"; } testfunc () { local VAR="OLD" VAR=NEW print_VAR } testfunc [lkundrak@demiurge ~]$ bash4 --posix feh.sh NEW [lkundrak@demiurge ~]$ bash5 --posix feh.sh OLD [lkundrak@demiurge ~]$ bash5 feh.sh NEW [lkundrak@demiurge ~]$ It works the way it did in Bash 4 in non-POSIX mode, for external programs, or for non-local variables. Don't ask me why -- it's probably some compatibility thing for some sad old people. However, this precisely happens when fsck_single() is calling into the fsck_drv_com(), assigned to _drv by fsck_able(). That ruins the TEST-70-BONDBRIDGETEAMVLAN test's server and probably more. Let's pass the fsck driver binary via the function argument instead. It's less messy anyway. |
||
---|---|---|
.. | ||
fs-lib.sh | ||
module-setup.sh |