* Create the "update-motd.d" to use the dynamic MOTD generation.
This commit is contained in:
parent
4039d202db
commit
3175d02e42
|
@ -5,6 +5,7 @@
|
|||
|
||||
##### Changes
|
||||
* Update dynmotd script (new process and sockets informations).
|
||||
* Create the "update-motd.d" to use the dynamic MOTD generation.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
|
|
|
@ -10,10 +10,17 @@ class dynmotd::config {
|
|||
mode => 0644,
|
||||
}
|
||||
|
||||
file { "${dynmotd::update_motd_dir_path}":
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file { "${dynmotd::dynmotd_bin_path}":
|
||||
ensure => present,
|
||||
mode => 0755,
|
||||
content => template("${dynmotd::dynmotd_bin_content}"),
|
||||
}
|
||||
|
||||
|
||||
File["${dynmotd::update_motd_dir_path}"] -> File["${dynmotd::dynmotd_bin_path}"]
|
||||
|
||||
} # Private class: dynmotd::config
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
class dynmotd (
|
||||
$dynmotd_bin_path = $dynmotd::params::dynmotd_bin_path,
|
||||
$dynmotd_bin_content = $dynmotd::params::dynmotd_bin_content,
|
||||
$update_motd_dir_path = $dynmotd::params::update_motd_dir_path,
|
||||
) inherits dynmotd::params {
|
||||
|
||||
include dynmotd::config
|
||||
|
|
|
@ -4,11 +4,15 @@ class dynmotd::params {
|
|||
case $::osfamily {
|
||||
'Debian': {
|
||||
|
||||
# Dynamic Motd's script directory
|
||||
$update_motd_dir_path = '/etc/update-motd.d'
|
||||
|
||||
# DynMotd script
|
||||
$dynmotd_bin_path = '/usr/local/bin/dynmotd'
|
||||
$dynmotd_bin_content = 'dynmotd/dynmotd_bin.erb'
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} # Private class: dynmotd::params
|
||||
|
|
Loading…
Reference in New Issue