#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions # this works false if [ $? -eq 0 ]; then stat_done else stat_fail fi # this always displays DONE status false