]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
update motd for new porterboxes
authorPeter Palfrader <peter@palfrader.org>
Sun, 21 Apr 2013 19:02:35 +0000 (19:02 +0000)
committerPeter Palfrader <peter@palfrader.org>
Sun, 21 Apr 2013 19:02:35 +0000 (19:02 +0000)
manifests/site.pp
modules/motd/templates/motd.erb

index c94e0e3693caab3e916ebd9ba3c1f1c9e2c40c0d..f1d2e4d4fa7a6dd7f79fc96260b2508fb47ea5a2 100644 (file)
@@ -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
 
index 8622602296ecc949c3fcfb1ecd26899b932863c0..9255b9b0e13daab610c0f054d6415020d5d6b23b 100644 (file)
@@ -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 <URL:http://dsa.debian.org/doc/install-req/>.\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 <chroot>', run commands in sessions using\n"
+      extra += "\schroot --run-session -c <session> [-- command]\, and tear down sessions\n"
+      extra += "using \schroot --end-session -c <session>'.  You can run a limited set of\n"
+      extra += "privileged commands, for instance some of apt-get, using\n"
+      extra += "'dd-schroot-cmd -c <session> <command>'."
+    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 <URL:http://dsa.debian.org/doc/install-req/>.\n"
+      end
     end
   end