From f8ee483fd01e95ae6217ab85d884ac8c0088b2bf Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 5 Aug 2016 13:07:38 +0300 Subject: [PATCH] root home: put back .bashrc As long as root shell is bash, its nice to keep .bashrc to have PS1 prompt setup. --- usr/src/cmd/nsadmin/Makefile | 8 ++++++-- usr/src/cmd/nsadmin/bashrc.sh | 5 +++++ usr/src/pkg/manifests/SUNWcs.mf | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 usr/src/cmd/nsadmin/bashrc.sh diff --git a/usr/src/cmd/nsadmin/Makefile b/usr/src/cmd/nsadmin/Makefile index 8d963d64ed..4417e9f271 100644 --- a/usr/src/cmd/nsadmin/Makefile +++ b/usr/src/cmd/nsadmin/Makefile @@ -25,7 +25,7 @@ PROG= profile .login ksh.kshrc system PROGSKEL= .profile .kshrc -PROGROOT= .profile +PROGROOT= .profile .bashrc include ../Makefile.cmd @@ -35,7 +35,7 @@ ROOTETCSKELPROG= $(PROGSKEL:%=$(ROOTETCSKEL)/%) ROOTROOTPROG= $(PROGROOT:%=$(ROOTROOT)/%) FILEMODE= 0644 -CLOBBERFILES = profile .profile .login .kshrc +CLOBBERFILES = profile .bashrc .profile .login .kshrc .login: login.csh $(RM) .login @@ -53,6 +53,10 @@ profile: etc-profile.sh $(RM) .kshrc $(CP) dot-kshrc.sh $@ +.bashrc: bashrc.sh + $(RM) .bashrc + $(CP) bashrc.sh $@ + .KEEP_STATE: all: $(PROG) $(PROGSKEL) diff --git a/usr/src/cmd/nsadmin/bashrc.sh b/usr/src/cmd/nsadmin/bashrc.sh new file mode 100644 index 0000000000..938b0da67e --- /dev/null +++ b/usr/src/cmd/nsadmin/bashrc.sh @@ -0,0 +1,5 @@ +# +# Define default prompt to @:<"($|#) "> +# and print '#' for user "root" and '$' for normal users. +# +typeset +x PS1="\u@\h:\w\\$ " diff --git a/usr/src/pkg/manifests/SUNWcs.mf b/usr/src/pkg/manifests/SUNWcs.mf index b56628ee40..23a2950b43 100644 --- a/usr/src/pkg/manifests/SUNWcs.mf +++ b/usr/src/pkg/manifests/SUNWcs.mf @@ -614,6 +614,7 @@ file path=lib/svc/share/mfsthistory mode=0444 file path=lib/svc/share/net_include.sh mode=0444 file path=lib/svc/share/routing_include.sh mode=0444 file path=lib/svc/share/smf_include.sh mode=0444 +file path=root/.bashrc group=root preserve=true file path=root/.profile group=root preserve=true file path=sbin/autopush mode=0555 $(i386_ONLY)file path=sbin/biosdev mode=0555 -- 2.11.4.GIT