def _chkconfig_add(name):
 cmd = '/sbin/chkconfig --add {0}'.format(name)
 if (__salt__['cmd.retcode'](cmd, python_shell=False) == 0):
  log.info('Added initscript "{0}" to chkconfig'.format(name))
  return True
 else:
  log.error('Unable to add initscript "{0}" to chkconfig'.format(name))
  return False

def _chkconfig_add ( name ) : cmd = '/sbin/chkconfig --add {0}' . format ( name ) if ( __salt__ [ 'cmd.retcode' ] ( cmd , python_shell = False ) == 0 ) : log . info ( 'Added initscript "{0}" to chkconfig' . format ( name ) ) return True else : log . error ( 'Unable to add initscript "{0}" to chkconfig' . format ( name ) ) return False
run chkconfig --add for a service whose script is installed in /etc/init .