rc.subr: Add common functions for run_rc_command