base-files: make diag.sh stub working in bash