From 8a1b2b52bbd5d451e73b7469108133c53c5d4c69 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 21 Apr 2013 19:02:35 +0000 Subject: [PATCH] update motd for new porterboxes --- manifests/site.pp | 2 +- modules/motd/templates/motd.erb | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index c94e0e36..f1d2e4d4 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -29,11 +29,11 @@ node default { include ntp include ntpdate include ssl - include motd include hardware include nagios::client include resolv include roles + include motd include unbound include bacula::client diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index 86226022..9255b9b0 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -49,10 +49,19 @@ if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose')) end purp += " porterbox" extra += "\n" - extra += "See 'dchroot -l' or 'schroot -l' for a list of available chroots.\n" - if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('admin') - extra += "Please contact #{ninfo['ldap']['admin'][0]} for install requests,\n" - extra += "following the recommendations in .\n" + if classes.include?("porterbox") + extra += "See 'schroot -l' for a list of available chroots. Start new sessions\n" + extra += "with 'schroot --begin-session -c ', run commands in sessions using\n" + extra += "\schroot --run-session -c [-- command]\, and tear down sessions\n" + extra += "using \schroot --end-session -c '. You can run a limited set of\n" + extra += "privileged commands, for instance some of apt-get, using\n" + extra += "'dd-schroot-cmd -c '." + else + extra += "See 'dchroot -l' or 'schroot -l' for a list of available chroots.\n" + if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('admin') + extra += "Please contact #{ninfo['ldap']['admin'][0]} for install requests,\n" + extra += "following the recommendations in .\n" + end end end -- 2.39.2