flag_key was declared with 'local' at script top level, which is only valid inside bash functions. This left flag_key empty, writing '=true' (malformed) to setup.db instead of 'HOST1_LOCAL_DONE=true'. Changed to a plain variable assignment.
flag_key was declared with 'local' at script top level, which is only valid inside bash functions. This left flag_key empty, writing '=true' (malformed) to setup.db instead of 'HOST1_LOCAL_DONE=true'. Changed to a plain variable assignment.