diff options
author | Jeffery To <jeffery.to@gmail.com> | 2020-04-29 04:31:03 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2020-04-29 04:38:24 +0800 |
commit | 1929baac6d247ea51b8fb7f8a33f46d137211eac (patch) | |
tree | 677714667765fda5a874b8a01db2768a09119212 /utils/bash/files/etc/bash.bashrc | |
parent | dc5f2df6a4d2a1a0ca1a25f105609fd801035963 (diff) |
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 <jeffery.to@gmail.com>
Diffstat (limited to 'utils/bash/files/etc/bash.bashrc')
-rw-r--r-- | utils/bash/files/etc/bash.bashrc | 6 |
1 files changed, 6 insertions, 0 deletions
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 |