aboutsummaryrefslogtreecommitdiffstats
path: root/roles/users/files/root
diff options
context:
space:
mode:
Diffstat (limited to 'roles/users/files/root')
-rw-r--r--roles/users/files/root/bash_profile5
-rw-r--r--roles/users/files/root/bash_profile.sh1
-rw-r--r--roles/users/files/root/bashrc4
3 files changed, 9 insertions, 1 deletions
diff --git a/roles/users/files/root/bash_profile b/roles/users/files/root/bash_profile
new file mode 100644
index 0000000..457213b
--- /dev/null
+++ b/roles/users/files/root/bash_profile
@@ -0,0 +1,5 @@
+if [[ -n "$SUDO_USER" && -f "/home/$SUDO_USER/.bashrc_root" ]]; then
+ . "/home/$SUDO_USER/.bashrc_root"
+else
+ . "$HOME/.bashrc"
+fi
diff --git a/roles/users/files/root/bash_profile.sh b/roles/users/files/root/bash_profile.sh
deleted file mode 100644
index 3ee6b29..0000000
--- a/roles/users/files/root/bash_profile.sh
+++ /dev/null
@@ -1 +0,0 @@
-. "$HOME/.bashrc"
diff --git a/roles/users/files/root/bashrc b/roles/users/files/root/bashrc
new file mode 100644
index 0000000..f380bc8
--- /dev/null
+++ b/roles/users/files/root/bashrc
@@ -0,0 +1,4 @@
+# if not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+stty -ixon