From 1929baac6d247ea51b8fb7f8a33f46d137211eac Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 29 Apr 2020 04:31:03 +0800 Subject: bash: Enable system-wide .bashrc file, source /etc/shinit This enables a system-wide .bashrc file (/etc/bash.bashrc), as well as some other options related to startup files, and sources /etc/shinit for interactive shells. Fixes https://bugs.openwrt.org/index.php?do=details&task_id=3019. Signed-off-by: Jeffery To --- utils/bash/files/etc/bash.bashrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 utils/bash/files/etc/bash.bashrc (limited to 'utils/bash/files/etc/bash.bashrc') diff --git a/utils/bash/files/etc/bash.bashrc b/utils/bash/files/etc/bash.bashrc new file mode 100644 index 000000000..158deaad8 --- /dev/null +++ b/utils/bash/files/etc/bash.bashrc @@ -0,0 +1,6 @@ +# System-wide .bashrc file + +# Continue if running interactively +[[ $- == *i* ]] || return 0 + +[ \! -s /etc/shinit ] || . /etc/shinit -- cgit v1.2.3