Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
scripts: add login banner & update PS1
Browse files Browse the repository at this point in the history
  • Loading branch information
pexcn committed Feb 2, 2021
1 parent d6a4b71 commit 7ad1b9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions trunk/user/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ endif
$(ROMFSINST) /etc_ro/profile
$(ROMFSINST) /etc_ro/shells
$(ROMFSINST) /etc_ro/mdev.conf
$(ROMFSINST) /etc_ro/banner
mkdir -p $(INSTALLDIR)/usr/share/terminfo
tar -xzf ./terminfo.tar.gz -C $(INSTALLDIR)/usr/share
6 changes: 6 additions & 0 deletions trunk/user/scripts/banner
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
____ __
/ __ \____ _____/ /___ __ ______ _____
/ /_/ / __ `/ __ / __ `/ | / / __ `/ __ \
/ ____/ /_/ / /_/ / /_/ /| |/ / /_/ / / / /
/_/ \__,_/\__,_/\__,_/ |___/\__,_/_/ /_/

5 changes: 3 additions & 2 deletions trunk/user/scripts/profile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

# If running interactively, then
if [ "$PS1" ] ; then

export PS1='\h:\w \$ '
export PATH=/opt/sbin:/opt/bin:/usr/sbin:/usr/bin:/sbin:/bin
export HOSTNAME=`/bin/hostname`
export TERMINFO=/usr/share/terminfo
export TERM=xterm

[ -r /etc_ro/banner ] && cat /etc_ro/banner
echo "Version: $(nvram get firmver_sub)"; echo ""
fi;

[ -r /opt/etc/profile ] && . /opt/etc/profile

0 comments on commit 7ad1b9c

Please sign in to comment.