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>
This commit is contained in:
Jeffery To
2020-04-29 04:31:03 +08:00
parent dc5f2df6a4
commit 1929baac6d
4 changed files with 40 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
# System-wide .bashrc file
# Continue if running interactively
[[ $- == *i* ]] || return 0
[ \! -s /etc/shinit ] || . /etc/shinit
@@ -0,0 +1 @@
[ -z "$BASH" ] || [ "$BASH" = /bin/sh ] || [ \! -s /etc/bash.bashrc ] || . /etc/bash.bashrc