code: def build_network_settings(**settings):
      '''
      Build the global network script.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' ip.build_network_settings <settings>
      '''
      if __grains__['lsb_distrib_id'] == 'nilrt':
          raise salt.exceptions.CommandExecutionError('Not supported in this version.')
      changes = []
      if 'networking' in settings:
          if settings['networking'] in _CONFIG_TRUE:
              __salt__['service.enable']('connman')
          else:
              __salt__['service.disable']('connman')
  
      if 'hostname' in settings:
          new_hostname = settings['hostname'].split('.', 1)[0]
          settings['hostname'] = new_hostname
          old_hostname = __salt__['network.get_hostname']
          if new_hostname != old_hostname:
              __salt__['network.mod_hostname'](new_hostname)
              changes.append('hostname={0}'.format(new_hostname))
  
      return changef build_network_settings(**settings):
      '''
      Build the global network script.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' ip.build_network_settings <settings>
      '''
      if __grains__['lsb_distrib_id'] == 'nilrt':
          raise salt.exceptions.CommandExecutionError('Not supported in this version.')
      changes = []
      if 'networking' in settings:
          if settings['networking'] in _CONFIG_TRUE:
              __salt__['service.enable']('connman')
          else:
              __salt__['service.disable']('connman')
  
      if 'hostname' in settings:
          new_hostname = settings['hostname'].split('.', 1)[0]
          settings['hostname'] = new_hostname
          old_hostname = __salt__['network.get_hostname']
          if new_hostname != old_hostname:
              __salt__['network.mod_hostname'](new_hostname)
              changes.append('hostname={0}'.format(new_hostname))
  
      return changes
docs: Build the global network script.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' ip.build_network_settings <settings>