Skip to content
Snippets Groups Projects
Select Git revision
  • 439979b10a52663d1c32b40524c7b2987fb5b2e5
  • master default protected
  • streebog
  • gost28147
  • master-updates
  • ed448
  • shake256
  • curve448
  • ecc-sqrt
  • gosthash94cp
  • cmac64
  • block16-refactor
  • siv-mode
  • cmac-layout
  • delete-des-compat
  • delete-rsa_blind
  • aes-struct-layout
  • release-3.4-fixes
  • struct-layout
  • attribute-deprecated
  • rename-data-symbols
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
  • nettle_3.5rc1
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
  • nettle_2.7.1_release_20130528
  • nettle_2.7_release_20130424
  • nettle_2.6_release_20130116
  • nettle_2.5_release_20120707
41 results

testutils.h

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    unitfile.erb 1.89 KiB
    <%#
      # Copyright © 2021-2023   Thomas Bellman, Linköping, Sweden
      # Licensed under the GNU LGPL v3+; see the README file for more information.
      #
    -%>
    <% resource_ref = "Systemd::%s[%s]" % [ @systemd_resource_type, @title, ]
       unit_comments = [@comment].flatten.join("\n").split("\n")
       unit_comments.collect! { |cline| "# " + cline }
       unit_comments << "\n"  if unit_comments.length > 0
    -%>
    <%= unit_comments.join("\n") -%>
    <%#									-%>
    <%#									-%>
    <%# Loop over sections ('Unit', 'Service', et.c)			-%>
    <% @options.sort.each do |section_name, section_options|
          next if section_name =~ /^#/
          section_comments = (@options['#'+section_name] or []).flatten().
    	    join("\n").split("\n")
    -%>
    <%= section_comments.collect { |cline| "# " + cline + "\n" }.join("") -%>
    [<%= section_name %>]
    <%#   # Loop over options in section					-%>
    <%    section_options.sort.each do |optname,value| -%>
    <%
    	 # Override instead of append to list option.
    	 # This is only valid if called from systemd::unit_options, not when
    	 # called from systemd::unit.
             if optname =~ /^-(.*)/
                if @systemd_resource_type == 'Unit_options'
                   optname = $1
    -%>
    <%= optname %>=
    <%          elsif @systemd_resource_type == 'Unit'
                   raise(Puppet::ParseError,
    		     "#{resource_ref}: Bad option name, ``#{optname}''")
                else
                   raise(Puppet::ParseError,
                         "#{resource_ref}: Internal error: bad value for $systemd_resource_type, ``#{systemd_resource_type}''")
    -%>
    <%          end -%>
    <%       end -%>
    <%       next if optname =~ /^#/ -%>
    <%       opt_comments = (section_options['#'+optname] or []).flatten().
    		join("\n").split("\n")
    -%>
    <%=      opt_comments.collect { |cline| "# " + cline + "\n" }.join("") -%>
    <%       [value].flatten.each do |v| -%>
    <%= optname %>=<%= v %>
    <%       end -%>
    <%    end %>
    <% end -%>
    # Managed by Puppet:  <%= resource_ref %>