Puppet Class: useradd::sysconfig_init
- Defined in:
- manifests/sysconfig_init.pp
Overview
Allow for the configuration of /etc/sysconfig/init
See /usr/share/doc/initscripts-<version>/sysconfig.txt for variable
definitions.
For all ‘setcolor` variables, use the following color options as a string:
* default
* black
* red
* green
* yellow
* blue
* magenta
* cyan
* white
author: SIMP Team <simp@simp-project.com>
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'manifests/sysconfig_init.pp', line 35
class useradd::sysconfig_init (
Useradd::Bootup $bootup = 'color',
Integer $res_col = 60,
Optional[String] $move_to_col = undef,
String $setcolor_success = 'green',
String $setcolor_failure = 'red',
String $setcolor_warning = 'yellow',
String $setcolor_normal = 'default',
Stdlib::AbsolutePath $single_user_login = '/sbin/sulogin',
Integer[1,8] $loglvl = 3,
Boolean $prompt = false,
Boolean $autoswap = false,
) {
if 'systemd' in $facts['init_systems'] {
$_unit_file_content = @("END")
[Service]
ExecStart=
ExecStart=-/bin/sh -c "${single_user_login}; /usr/bin/systemctl --fail --no-block default"
| END
systemd::dropin_file{ 'emergency_exec.conf':
unit => 'emergency.service',
content => $_unit_file_content
}
systemd::dropin_file{ 'rescue_exec.conf':
unit => 'rescue.service',
content => $_unit_file_content
}
}
file { '/etc/sysconfig/init':
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0644',
content => template('useradd/etc/sysconfig/init.erb')
}
}
|