def _rcconf_status(name, service_status):
 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):
  __salt__['file.replace'](rcconf, rxname, newstatus)
 else:
  ret = __salt__['file.append'](rcconf, newstatus)
 return ret

def _rcconf_status ( name , service_status ) : 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 ) : __salt__ [ 'file.replace' ] ( rcconf , rxname , newstatus ) else : ret = __salt__ [ 'file.append' ] ( rcconf , newstatus ) return ret
modifies /etc/rc .