Hi! Just starting to play with this...
Too me it looks like the "grep" in mbrdevices=$($ROOTCMD udevadm info -r --query=symlink $BOOT_DEVICE | grep -Po '/dev/disk/by-id/ata\S+') will emit an exit status 1 if it does not find a match. This is propagated as the script error status (due to the trap). Maybe an additional "| cat" at the end could be used to gobble the status of "grep"... -- Stefan