]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Updating profile to squeeze
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2011 21:52:54 +0000 (19:52 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2011 21:52:54 +0000 (19:52 -0200)
files/bin/prompt.sh
files/etc/bash.bashrc
files/etc/profile.lenny [moved from files/etc/profile with 93% similarity]
manifests/nodo.pp

index 71ab73c042873d2b3e97bcf0aef72208c84180d0..85d7bff263bedb614b08483cf78d97197805b49d 100644 (file)
@@ -33,3 +33,5 @@ function command_prompt() {
   PS1="(${status_color}${exit_status}${COLOR_NONE}) [${COLOR_RED}\D{%Y%m%d %H:%M:%S}${COLOR_NONE}] ${COLOR_GREEN}\u@\h${COLOR_NONE}:${COLOR_CYAN}\w${COLOR_NONE} \\$ "
   PS2="${BOLD}>${OFF} "
 }
+
+PROMPT_COMMAND="command_prompt"
index ed7362ac722974d88bdc28b3873d3c80d8688b09..89b5a578603798fe0439e6e27c2a4e89bdcc2786 100644 (file)
@@ -29,9 +29,9 @@ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
 #esac
 
 # enable bash completion in interactive shells
-#if [ -f /etc/bash_completion ]; then
-#    . /etc/bash_completion
-#fi
+if [ -f /etc/bash_completion ]; then
+    . /etc/bash_completion
+fi
 
 # if the command-not-found package is installed, use it
 if [ -x /usr/lib/command-not-found ]; then
similarity index 93%
rename from files/etc/profile
rename to files/etc/profile.lenny
index d397ec7386fa931788a29a2fd9e0e31463f493c9..05b4e535bb3a0848ac9ed47d24be2eac744d27dd 100644 (file)
@@ -11,7 +11,6 @@ if [ "$PS1" ]; then
   if [ "$BASH" ]; then
     PS1='\u@\h:\w\$ '
     . /usr/local/bin/prompt.sh
-    PROMPT_COMMAND="command_prompt"
   else
     if [ "`id -u`" -eq 0 ]; then
       PS1='# '
index 6faff956492b6a8961a400c1bce0c906937d05d3..d1ac02c3fe180db4ed8078bee0d290918acba58b 100644 (file)
@@ -67,8 +67,13 @@ class nodo {
     ensure  => present,
   }
 
+  # As of squeeze, custom configuration can be placed directly at
+  # /etc/profile.d, so in the future this file won't need to be
+  # managed by puppet.
   file { "/etc/profile":
-    source  => "puppet://$server/modules/nodo/etc/profile",
+    source  => [ "puppet://$server/modules/nodo/etc/profile.$lsbdistcodename",
+                 "puppet://$server/modules/nodo/etc/profile",
+               ],
     owner   => "root",
     group   => "root",
     mode    => 0644,
@@ -85,6 +90,8 @@ class nodo {
     require => File['/usr/local/bin/prompt.sh'],
   }
 
+  # As of squeeze, custom configuration can be placed directly at
+  # /etc/profile.d, so in the future this file has to stay there.
   file { "/usr/local/bin/prompt.sh":
     source  => "puppet://$server/modules/nodo/bin/prompt.sh",
     owner   => "root",
@@ -92,4 +99,12 @@ class nodo {
     mode    => 0755,
     ensure  => present,
   }
+
+  # Squeeze prompt should be at /etc/profile.d
+  file { "/etc/profile.d/prompt.sh":
+    owner   => "root",
+    group   => "root",
+    ensure  => "/usr/local/bin/prompt.sh"
+    require => File['/usr/local/bin/prompt.sh'],
+  }
 }