def _rcconf_status(name, service_status):
    '''
    Modifies /etc/rc.conf so a service is started or not at boot time and
    can be started via /etc/rc.d/<service>
    '''
    rcconf = '/etc/rc.conf'
    rxname = '^{0}=.*'.format(name)
    newstatus = '{0}={1}'.format(name, service_status)
    ret = __salt__['cmd.retcode']('grep \'{0}\' {1}'.format(rxname, rcconf))
    if ret == 0:  # service found in rc.conf, modify its status
        __salt__['file.replace'](rcconf, rxname, newstatus)
    else:
        ret = __salt__['file.append'](rcconf, newstatus)

    return ret
Modifies /etc/rc.conf so a service is started or not at boot time and
    can be started via /etc/rc.d/<service>