Method: Unix::File#noask_file_text

Defined in:
lib/beaker/host/unix/file.rb

#noask_file_textString

Returns the noask file text for Solaris hosts

Returns:

  • (String)

    the text of the noask file

Raises:

  • (ArgumentError)

    If called on a host with a platform that’s not Solaris



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/beaker/host/unix/file.rb', line 158

def noask_file_text
  if self['platform'].variant == 'solaris' && self['platform'].version == '10'
    noask = <<~NOASK
      # Write the noask file to a temporary directory
      # please see man -s 4 admin for details about this file:
      # http://www.opensolarisforum.org/man/man4/admin.html
      #
      # The key thing we don't want to prompt for are conflicting files.
      # The other nocheck settings are mostly defensive to prevent prompts
      # We _do_ want to check for available free space and abort if there is
      # not enough
      mail=
      # Overwrite already installed instances
      instance=overwrite
      # Do not bother checking for partially installed packages
      partial=nocheck
      # Do not bother checking the runlevel
      runlevel=nocheck
      # Do not bother checking package dependencies (We take care of this)
      idepend=nocheck
      rdepend=nocheck
      # DO check for available free space and abort if there isn't enough
      space=quit
      # Do not check for setuid files.
      setuid=nocheck
      # Do not check if files conflict with other packages
      conflict=nocheck
      # We have no action scripts.  Do not check for them.
      action=nocheck
      # Install to the default base directory.
      basedir=default
    NOASK
  else
    msg = "noask file text unknown for platform '#{self['platform']}'"
    raise ArgumentError, msg
  end
  noask
end