lkairies osd smart status

You should explicitly search for "PASSED". Currently, your script is successful even without any permission for sudo.