Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/root Get rid of the (insulting)



details:   https://anonhg.NetBSD.org/src/rev/bed6729412da
branches:  trunk
changeset: 368597:bed6729412da
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Jul 21 07:51:12 2022 +0000

description:
Get rid of the (insulting)
        We recommend that you create a non-root account...
message from single user mode shell startups.

diffstat:

 etc/root/dot.profile |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r c04ecaa790c4 -r bed6729412da etc/root/dot.profile
--- a/etc/root/dot.profile      Thu Jul 21 07:49:36 2022 +0000
+++ b/etc/root/dot.profile      Thu Jul 21 07:51:12 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: dot.profile,v 1.33 2022/07/09 09:43:51 kre Exp $
+#      $NetBSD: dot.profile,v 1.34 2022/07/21 07:51:12 kre Exp $
 
 case "${PATH}" in
 /rescue:*)     ;; # leave it alone, user can change manually (if required)
@@ -21,6 +21,6 @@
 export ENV=/root/.shrc
 
 # Do not display in 'su -' case
-if [ -z "$SU_FROM" ]; then
+if [ -z "$SU_FROM" ] && [ "$PPID" -ne 1 ]; then
         echo "We recommend that you create a non-root account and use su(1) for root access."
 fi



Home | Main Index | Thread Index | Old Index