* Add the display of the Motd upon successful shadow login.
This commit is contained in:
parent
1178ec827d
commit
91d87a60b1
|
@ -16,7 +16,7 @@
|
|||
* Edit script's name: an underscore (_) in the name prevent the script to runs.
|
||||
* Add a template to manage the static motd (/etc/motd).
|
||||
* Rename the ::config class into ::install, because it's provide and install everything to have dynamic Motd.
|
||||
* Add the display of the Motd upon successful ssh login.
|
||||
* Add the display of the Motd upon successful shadow or ssh login.
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
|
|
@ -13,7 +13,17 @@ class dynmotd::config {
|
|||
],
|
||||
onlyif => "match *[argument = 'motd=${dynmotd::dynmotd_path}'] size == 0",
|
||||
}
|
||||
}
|
||||
|
||||
# Need to print Motd upon successful shadow login
|
||||
if $dynmotd::print_motd_login == true {
|
||||
augeas { 'print_motd_login':
|
||||
context => '/files/etc/pam.d/login',
|
||||
changes => [
|
||||
"set *[module = 'pam_motd.so']/argument motd=${dynmotd::dynmotd_path}",
|
||||
],
|
||||
onlyif => "match *[argument = 'motd=${dynmotd::dynmotd_path}'] size == 0",
|
||||
}
|
||||
}
|
||||
|
||||
} # Private class: dynmotd::config
|
||||
|
|
|
@ -51,6 +51,7 @@ class dynmotd (
|
|||
$static_motd_path = $dynmotd::params::static_motd_path,
|
||||
$static_motd_content = $dynmotd::params::static_motd_content,
|
||||
$print_motd_ssh = $dynmotd::params::print_motd_ssh,
|
||||
$print_motd_login = $dynmotd::params::print_motd_login,
|
||||
) inherits dynmotd::params {
|
||||
|
||||
include dynmotd::install
|
||||
|
|
|
@ -27,6 +27,7 @@ class dynmotd::params {
|
|||
|
||||
# Print Motd
|
||||
$print_motd_ssh = true
|
||||
$print_motd_login = true
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue