NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
install/59008: set $ENV in the default skel/dot.cshrc as dot.profile
>Number: 59008
>Category: install
>Synopsis: set $ENV in the default skel/dot.cshrc as dot.profile
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: install-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jan 19 08:10:00 +0000 2025
>Originator: Izumi Tsutsui
>Release: NetBSD 10.1
>Organization:
>Environment:
System: NetBSD mirage 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: all
Machine: all
>Description:
The default root shell has been changed from /bin/csh to /bin/sh
since 2012:
https://github.com/NetBSD/src/commit/a1da65bd
However if a user's shell is /bin/csh (or /usr/pkg/bin/tcsh)
and the user uses the default skel/dot.cshrc, it doesn't set
$ENV to configure sh(1) to load .shrc at every startup,
not just login shells.
Then all csh users have to enter ". /etc/shrc" etc. to enable
line editing (set -o emacs) and file completion (set -o tabcomplete)
on using su(1) to root or invoking sh(1) prompt manually.
This change (to set $ENV in dot.cshrc as dot.profile does)
solves such annoying situation.
>How-To-Repeat:
See above.
>Fix:
Just add $ENV settings in interactive case in src/etc/skel/dot.cshrc:
diff --git a/etc/skel/dot.cshrc b/etc/skel/dot.cshrc
index 3a3e4037e1e3..4d2705543f09 100644
--- a/etc/skel/dot.cshrc
+++ b/etc/skel/dot.cshrc
@@ -62,4 +62,7 @@ if ($?prompt) then
# Set the prompt to include the hostname.
set mch = `hostname -s`
set prompt = "${mch:q}: {\!} "
+
+ # Configure the shell (on su(1) etc.) to load .shrc at startup time.
+ setenv ENV ~/.shrc
endif
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index