aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/bin/prompt.sh2
-rw-r--r--files/etc/bash.bashrc6
-rw-r--r--files/etc/profile.lenny (renamed from files/etc/profile)1
-rw-r--r--manifests/nodo.pp17
4 files changed, 21 insertions, 5 deletions
diff --git a/files/bin/prompt.sh b/files/bin/prompt.sh
index 71ab73c..85d7bff 100644
--- a/files/bin/prompt.sh
+++ b/files/bin/prompt.sh
@@ -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"
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index ed7362a..89b5a57 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -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
diff --git a/files/etc/profile b/files/etc/profile.lenny
index d397ec7..05b4e53 100644
--- a/files/etc/profile
+++ b/files/etc/profile.lenny
@@ -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='# '
diff --git a/manifests/nodo.pp b/manifests/nodo.pp
index 6faff95..d1ac02c 100644
--- a/manifests/nodo.pp
+++ b/manifests/nodo.pp
@@ -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'],
+ }
}