6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
# File 'manifests/config.pp', line 6
class byobu::config {
if "${byobu::byobu_version}" !~ /^(absent|purged)$/ {
file { 'byobu_backend':
ensure => file,
path => $byobu::byobu_backend_path,
mode => '0644',
owner => 'root',
group => $byobu::byobu_backend_group,
content => template('byobu/backend.erb')
}
}
# only apply those features if wanted and byobu was not just removed
# (the directories /usr/share/byobu/ and /usr/lib/byobu/ were removed)
if ($byobu::overwrite_usr_config) and ("${byobu::byobu_version}" !~ /^(absent|purged)$/) {
# STATUS
file { 'byobu_status':
ensure => file,
path => $byobu::byobu_status_path,
mode => '0644',
owner => 'root',
group => $byobu::byobu_status_group,
content => template('byobu/status.erb')
}
# keybindings
file { 'byobu_common_keybindings':
ensure => file,
path => $byobu::byobu_common_keybindings_path,
mode => '0644',
owner => 'root',
group => $byobu::byobu_common_keybindings_grp,
content => template('byobu/keybindings_common.erb')
}
case $byobu::byobu_terminal_multiplexer {
'tmux': {
file { 'byobu_f-keys.tmux_keybindings':
ensure => file,
path => $byobu::byobu_fkeys_tmux_keybinds_p,
mode => '0644',
owner => 'root',
group => $byobu::byobu_fkeys_tmux_keybinds_grp,
content => template('byobu/keybindings_f-keys.tmux.erb')
}
}
'screen': {
file { 'byobu_f-keys.screen_keybindings':
ensure => file,
path => $byobu::byobu_fkeys_screen_keybinds_p,
mode => '0644',
owner => 'root',
group => $byobu::byobu_fkeys_screen_keybinds_g,
content => template('byobu/keybindings_f-keys.screen.erb')
}
}
}
# please read back, that your usage case is covered in the readme.md
if $byobu::overwrite_various_status {
file { 'byobu_lib_hostname':
ensure => file,
path => $byobu::byobu_lib_hostname_path,
mode => '0755',
owner => 'root',
group => $byobu::byobu_lib_hostname_group,
content => template('byobu/hostname.erb')
}
file { 'byobu_lib_arch':
ensure => file,
path => $byobu::byobu_lib_arch_path,
mode => '0755',
owner => 'root',
group => $byobu::byobu_lib_arch_group,
content => template('byobu/arch.erb')
}
}
}
# debconf selections
if $byobu::launch_by_default_ensure_set {
# variables outhoused to avoid incredible long lines
$_launch_x_default_cmds = @("EOT"/L)
/usr/bin/debconf-set-selections ${byobu::install::preseed_path}; \
/usr/sbin/dpkg-reconfigure -fnoninteractive byobu
|-EOT
$_launch_x_default_check_cmd = @("EOT"/L)
/usr/bin/debconf-show byobu | /bin/grep -q 'byobu/launch-by-default: \
${byobu::byobu_launch_by_default}'
|-EOT
exec { 'byobu_ensure_launch_x_default_is_set':
command => $_launch_x_default_cmds,
#environment => [
# 'DEBIAN_FRONTEND=\'noninteractive\'',
# 'DEBCONF_NONINTERACTIVE_SEEN=\'true\''
# ],
unless => $_launch_x_default_check_cmd,
}
}
}
|