]> Zhao Yanbai Git Server - minix.git/commitdiff
Import NetBSD shell environment files 79/2879/1
authorLionel Sambuc <lionel@minix3.org>
Mon, 10 Nov 2014 15:09:08 +0000 (16:09 +0100)
committerLionel Sambuc <lionel@minix3.org>
Mon, 10 Nov 2014 15:48:56 +0000 (16:48 +0100)
With the import of Xorg, a proper separation between login-time and sub
shell-time of the environment setup is necessary.

Instead of re-developping this from scratch, I am taking the opportunity
to import the NetBSD default environment.

Change-Id: Ib6a8fbd9c2f407ccd59be57a52ef9df21c2c9ce7

23 files changed:
distrib/sets/lists/minix/mi
etc/Makefile
etc/ast/.exrc [deleted file]
etc/ast/.profile [deleted file]
etc/csh.cshrc [new file with mode: 0644]
etc/csh.login [new file with mode: 0644]
etc/csh.logout [new file with mode: 0644]
etc/mtree/NetBSD.dist.base
etc/profile
etc/root/Makefile [new file with mode: 0644]
etc/root/dot.cshrc [new file with mode: 0644]
etc/root/dot.klogin [new file with mode: 0644]
etc/root/dot.login [new file with mode: 0644]
etc/root/dot.profile [new file with mode: 0644]
etc/root/dot.shrc [new file with mode: 0644]
etc/shrc [new file with mode: 0644]
etc/skel/Makefile [new file with mode: 0644]
etc/skel/dot.cshrc [new file with mode: 0644]
etc/skel/dot.login [new file with mode: 0644]
etc/skel/dot.logout [new file with mode: 0644]
etc/skel/dot.profile [new file with mode: 0644]
etc/skel/dot.shrc [new file with mode: 0644]
usr.sbin/user/user.c

index 4790ead89e2ccf1e5c61c9b7ca0aadd5d577e7c8..98de10b36595e165fd4af7a07c5a2c0412490c9a 100644 (file)
@@ -75,6 +75,9 @@
 ./etc                                  minix-sys
 ./etc/atf                              minix-sys       atf
 ./etc/boot.cfg.default                 minix-sys
+./etc/csh.cshrc                                minix-sys
+./etc/csh.login                                minix-sys
+./etc/csh.logout                       minix-sys
 ./etc/defaults                         minix-sys
 ./etc/defaults/minix.rc.conf           minix-sys
 ./etc/defaults/rc.conf                 minix-sys
 ./etc/rs.single                                minix-sys
 ./etc/services                         minix-sys
 ./etc/shells                           minix-sys
+./etc/shrc                             minix-sys
+./etc/skel                             minix-sys
+./etc/skel/.cshrc                      minix-sys
+./etc/skel/.login                      minix-sys
+./etc/skel/.logout                     minix-sys
+./etc/skel/.profile                    minix-sys
+./etc/skel/.shrc                       minix-sys
 ./etc/spwd.db                          minix-sys
 ./etc/syslog.conf                      minix-sys
 ./etc/system.conf                      minix-sys
 ./mnt                                  minix-sys
 ./proc                                 minix-sys
 ./root                                 minix-sys
-./root/.exrc                           minix-sys
+./root/.cshrc                          minix-sys
+./root/.exrc                           minix-sys       obsolete
+./root/.klogin                         minix-sys
+./root/.login                          minix-sys
 ./root/.profile                                minix-sys
+./root/.shrc                           minix-sys
 ./sbin                                 minix-sys
 ./sbin/chown                           minix-sys
 ./sbin/fsck                            minix-sys
 ./usr                                  minix-sys
 ./usr/adm                              minix-sys
 ./usr/adm/old                          minix-sys
-./usr/ast                              minix-sys
-./usr/ast/.exrc                                minix-sys
-./usr/ast/.profile                     minix-sys
+./usr/ast                              minix-sys       obsolete
+./usr/ast/.exrc                                minix-sys       obsolete
+./usr/ast/.profile                     minix-sys       obsolete
 ./usr/benchmarks                                       minix-sys
 ./usr/benchmarks/unixbench                             minix-sys
 ./usr/benchmarks/unixbench/pgms                                minix-sys
index 8f166206463f6d6a6e79ad0008677e05813f6cb5..a4b4a47f332ce50165aefb26f817e2720de8df5c 100644 (file)
@@ -308,7 +308,11 @@ install-etc-files: .PHONY .MAKE check_DESTDIR MAKEDEV
                ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ resolv.conf \
                ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ motd \
                ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ rc.conf \
-               ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ profile 
+               ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ shrc \
+               ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ csh.cshrc \
+               ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ csh.login \
+               ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ csh.logout \
+               ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ profile
        ${_MKMSG_INSTALL} ${DESTDIR}${tdir}${files:T}
        if [ ! -e ${tdir} ]; then \
                ${INSTALL_DIR} ${tdir}; \
@@ -434,8 +438,6 @@ install-etc-files-safe: .PHONY .MAKE check_DESTDIR MAKEDEV
                ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/devmand/ ${DESTDIR}/etc/devmand/ usb_storage.cfg \
                ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/devmand/scripts/ ${DESTDIR}/etc/devmand/scripts/ block  \
                ${BINOWN} ${BINGRP}     ${BINMODE}      ${NETBSDSRCDIR}/etc/devmand/scripts/ ${DESTDIR}/etc/devmand/scripts/ singlechar \
-               ${BINOWN} ${BINGRP}     ${NONBINMODE}   ${NETBSDSRCDIR}/etc/ast/ ${DESTDIR}/usr/ast/ .[aepv]* \
-               ${BINOWN} ${BINGRP}     ${NONBINMODE}   ${NETBSDSRCDIR}/etc/ast/ ${DESTDIR}/root/ .[aepv]* \
 
        ${_MKMSG_INSTALL} ${DESTDIR}${tdir}${files:T}
        if [ ! -e ${tdir} ]; then \
@@ -449,7 +451,7 @@ install-etc-files-safe: .PHONY .MAKE check_DESTDIR MAKEDEV
        ${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/etc/rc.capes/* ${DESTDIR}/etc/rc.capes
        ${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/minix/drivers/usb/usbd/usbd.conf ${DESTDIR}/etc/system.conf.d/usbd
 .endif # Minix/earm specific
-.for subdir in . defaults mtree
+.for subdir in . defaults mtree root skel
        ${MAKEDIRTARGET} ${subdir} configinstall
 .endfor
        ${_MKMSG_INSTALL} ${DESTDIR}/usr/lib/fonts
diff --git a/etc/ast/.exrc b/etc/ast/.exrc
deleted file mode 100644 (file)
index 4c676d3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-set autoindent autowrite report=2 showmatch
diff --git a/etc/ast/.profile b/etc/ast/.profile
deleted file mode 100644 (file)
index 5ac0d8f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# Login shell profile.
-
-umask 022
-
-# Favourite editor and pager, search path for binaries, etc.
-export EDITOR=vi
-export PAGER=less
-
-# Let cd display the current directory on the status line.
-if [ -t 0 -a -f /usr/bin/tget ] && tget -flag hs
-then
-case $- in *i*)
-       hostname=$(expr $(uname -n) : '\([^.]*\)')
-       eval "cd()
-       {
-               chdir \"\$@\" &&
-               echo -n '$(tget -str ts \
-                               "$USER@$hostname:'\"\`pwd\`\"'" \
-                               -str fs)'
-       }"
-       unset hostname
-       cd .
-       ;;
-esac
-fi
-
-# Check terminal type.
-case $TERM in
-dialup|unknown|network)
-       echo -n "Terminal type? ($TERM) "; read term
-       TERM="${term:-$TERM}"
-       unset term
-esac
diff --git a/etc/csh.cshrc b/etc/csh.cshrc
new file mode 100644 (file)
index 0000000..1561264
--- /dev/null
@@ -0,0 +1,3 @@
+#      $NetBSD: csh.cshrc,v 1.2 1996/05/08 17:19:27 thorpej Exp $
+#
+# System-wide .cshrc file for csh(1).
diff --git a/etc/csh.login b/etc/csh.login
new file mode 100644 (file)
index 0000000..7060358
--- /dev/null
@@ -0,0 +1,3 @@
+#      $NetBSD: csh.login,v 1.2 1996/05/08 17:19:28 thorpej Exp $
+#
+# System-wide .login file for csh(1).
diff --git a/etc/csh.logout b/etc/csh.logout
new file mode 100644 (file)
index 0000000..d876772
--- /dev/null
@@ -0,0 +1,3 @@
+#      $NetBSD: csh.logout,v 1.2 1996/05/08 17:19:31 thorpej Exp $
+#
+# System-wide .logout file for csh(1).
index fc380cf56b0b5b12956c3bbc93b95d8217019de6..ece90ce0c08056597b8f9d92c5d78c8199e67ee2 100644 (file)
@@ -38,6 +38,7 @@
 ./etc/fonts/conf.avail
 ./etc/fonts/conf.d
 ./etc/mtree
+./etc/skel
 ./etc/system.conf.d
 ./home
 ./lib
@@ -50,7 +51,6 @@
 ./usr
 ./usr/adm
 ./usr/adm/old
-./usr/ast
 ./usr/bin
 ./usr/etc
 ./usr/benchmarks
index 2a0186958f9f8d9936ae6fa1dd381ab2a5f01d2e..5801079e0e447d075eb5b3f28cc37bad262b67ac 100755 (executable)
@@ -1,28 +1,10 @@
-# Default system-wide login shell profile.
-
-# Activate emacs keybindings and command line history support
-set -o emacs
-set -o tabcomplete
-
-# Set the default path
-PATH=/usr/X11R7/bin:/usr/local/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/games
-
-# Add ~/bin, iff it is present
-if [ -e ${HOME}/bin ]; then
-       PATH=${HOME}/bin:${PATH}
-fi
-
-# Add sbin for root
-if [ "x$(id -u)" = "x0" ]; then
-       PATH=/usr/X11R7/sbin:/usr/local/sbin:/usr/pkg/sbin:/usr/sbin:/sbin:${PATH}
-
-       if [ -e ${HOME}/sbin ]; then
-               PATH=${HOME}/sbin:${PATH}
-       fi
-fi
+#      $NetBSD: profile,v 1.1 1997/06/21 06:07:39 mikel Exp $
+#
+# System-wide .profile file for sh(1).
 
+# MINIX specifics
 # Set library path
-export LD_LIBRARY_PATH="/usr/local/lib:/usr/pkg/lib:/usr/X11R7/lib:/usr/lib:/lib"
+export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/X11R7/lib:/usr/pkg/lib:/usr/local/lib"
 
 # Set the timezone
 export TZ=GMT0
@@ -32,5 +14,4 @@ if [ -f ${RC_TZ} ]; then
        . ${RC_TZ}
 fi
 
-export PATH TZ
-
+export TZ
diff --git a/etc/root/Makefile b/etc/root/Makefile
new file mode 100644 (file)
index 0000000..3c92092
--- /dev/null
@@ -0,0 +1,19 @@
+#      $NetBSD: Makefile,v 1.4 2012/11/17 23:08:38 uwe Exp $
+
+CONFIGFILES=           dot.cshrc dot.klogin dot.login dot.profile dot.shrc
+
+FILESDIR=              /root
+FILESMODE=             644
+FILESMODE_dot.klogin=  600
+.for F in ${CONFIGFILES}
+FILESNAME_${F}=                ${F:S/dot//}
+.endfor
+
+.include <bsd.own.mk>
+.if !defined(__MINIX)
+CONFIGLINKS=           /root/.cshrc    /.cshrc \
+                       /root/.profile  /.profile
+.endif # !defined(__MINIX)
+
+.include <bsd.files.mk>
+.include <bsd.links.mk>
diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
new file mode 100644 (file)
index 0000000..c128145
--- /dev/null
@@ -0,0 +1,43 @@
+#      $NetBSD: dot.cshrc,v 1.24 2012/03/11 17:28:47 he Exp $
+
+alias  h       history
+alias  j       jobs -l
+alias  hup     '( set pid=$< ; kill -HUP $pid ) < /var/run/\!$.pid'
+alias  la      ls -a
+alias  lf      ls -FA
+alias  ll      ls -l
+
+alias  x       exit
+alias  z       suspend
+
+alias  back    'set back="$old"; set old="$cwd"; cd "$back"; unset back; dirs'
+alias  cd      'set old="$cwd"; chdir \!*'
+alias  pd      pushd
+alias  pd2     pushd +2
+alias  pd3     pushd +3
+alias  pd4     pushd +4
+alias  tset    'set noglob histchars=""; eval `\tset -s \!*`; unset noglob histchars'
+
+setenv BLOCKSIZE 1k
+
+# Uncomment the following line(s) to install binary packages
+# from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
+#setenv PKG_PATH "ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/6.0/All"
+#setenv PKG_PATH "${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.1/All"
+#setenv PKG_PATH "${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.0/All"
+
+set history=1000
+set path=(/sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/X11R7/bin /usr/X11R6/bin /usr/local/sbin /usr/local/bin)
+
+# directory stuff: cdpath/cd/back
+set cdpath=(/usr/src/{sys,bin,sbin,usr.{bin,sbin},lib,libexec,share,local,games,gnu/{usr.{bin,sbin},libexec,lib,games}})
+
+if ($?prompt && -x /usr/bin/id ) then
+       if (`/usr/bin/id -u` == 0) then
+               set prompt="`hostname -s`# "
+       else
+               set prompt="`hostname -s`% "
+       endif
+endif
+
+umask 022
diff --git a/etc/root/dot.klogin b/etc/root/dot.klogin
new file mode 100644 (file)
index 0000000..a7d8774
--- /dev/null
@@ -0,0 +1,2 @@
+#      $NetBSD: dot.klogin,v 1.3 1997/10/28 03:33:20 mrg Exp $
+
diff --git a/etc/root/dot.login b/etc/root/dot.login
new file mode 100644 (file)
index 0000000..b55d7bb
--- /dev/null
@@ -0,0 +1,8 @@
+#      $NetBSD: dot.login,v 1.9 2009/05/15 23:57:50 ad Exp $
+
+eval `tset -sQrm 'unknown:?unknown'`
+
+# Do not display in 'su -' case
+if ( ! $?SU_FROM ) then
+       echo "We recommend that you create a non-root account and use su(1) for root access."
+endif
diff --git a/etc/root/dot.profile b/etc/root/dot.profile
new file mode 100644 (file)
index 0000000..6793df1
--- /dev/null
@@ -0,0 +1,29 @@
+#      $NetBSD: dot.profile,v 1.26 2012/03/11 17:28:47 he Exp $
+
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
+export PATH=${PATH}:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
+
+# Uncomment the following line(s) to install binary packages
+# from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
+#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/6.0/All
+#export PKG_PATH="${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All"
+#export PKG_PATH="${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.0/All"
+
+export BLOCKSIZE=1k
+
+export HOST="$(hostname)"
+
+if [ -x /usr/bin/tset ]; then
+       eval $(tset -sQrm 'unknown:?unknown')
+fi
+
+umask 022
+#ulimit -c 0
+
+export ENV=/root/.shrc
+
+# Do not display in 'su -' case
+# Would be nice, but still not tested enough on MINIX
+#if [ -z "$SU_FROM" ]; then
+#        echo "We recommend that you create a non-root account and use su(1) for root access."
+#fi
diff --git a/etc/root/dot.shrc b/etc/root/dot.shrc
new file mode 100644 (file)
index 0000000..2220d46
--- /dev/null
@@ -0,0 +1,12 @@
+#      $NetBSD: dot.shrc,v 1.8 2007/11/24 11:14:41 pavel Exp $
+
+if [ -f /etc/shrc ]; then
+       . /etc/shrc
+fi
+
+hup(){ (read pid; kill -HUP $pid) </var/run/$1.pid; }
+
+case "$-" in *i*)
+       # interactive mode settings go here
+       ;;
+esac
diff --git a/etc/shrc b/etc/shrc
new file mode 100644 (file)
index 0000000..c465cf9
--- /dev/null
+++ b/etc/shrc
@@ -0,0 +1,20 @@
+#       $NetBSD: shrc,v 1.7 2010/12/27 03:38:52 christos Exp $
+#
+# System-wide .shrc file for sh(1).
+
+ll(){ ls -l ${1+"$@"}; }
+
+case "$-" in *i*)
+       if /bin/test -z "${HOST}"; then
+               HOST="$(hostname)"
+       fi
+       # hostname is set to the ip address by default on MINIX, so
+       # don't truncate on the first dot.
+       #PS1="${HOST%%.*}$PS1"
+       PS1="${HOST}$PS1"
+       set -o emacs
+       # This file is used by shells that might not support
+       # set -o tabcomplete, so check before trying to use it.
+       ( set -o tabcomplete 2>/dev/null ) && set -o tabcomplete
+       ;;
+esac
diff --git a/etc/skel/Makefile b/etc/skel/Makefile
new file mode 100644 (file)
index 0000000..56d1c3f
--- /dev/null
@@ -0,0 +1,10 @@
+#      $NetBSD: Makefile,v 1.8 2006/09/01 13:01:55 tron Exp $
+#      from: @(#)Makefile      8.1 (Berkeley) 6/8/93
+
+CONFIGFILES=   dot.cshrc dot.login dot.logout dot.profile dot.shrc
+FILESDIR=      /etc/skel
+.for F in ${CONFIGFILES}
+FILESNAME_${F}=        ${F:S/dot//}
+.endfor
+
+.include <bsd.prog.mk>
diff --git a/etc/skel/dot.cshrc b/etc/skel/dot.cshrc
new file mode 100644 (file)
index 0000000..a1b69d1
--- /dev/null
@@ -0,0 +1,57 @@
+#      $NetBSD: dot.cshrc,v 1.7 2011/10/19 14:42:37 christos Exp $
+#
+# This is the default .cshrc file.
+# Users are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed each time a new csh shell
+# is started.
+#
+# See csh(1) for details.
+#
+
+# Set your editor. Default to explicitly setting vi, as otherwise some
+# software will run ed and other software will fail. Can be set to
+# emacs or nano or whatever other editor you may prefer, but of course
+# those editors must be installed before you can use them.
+setenv EDITOR  vi
+
+# vi settings: set show-match auto-indent always-redraw shift-width=4
+#setenv        EXINIT  "se sm ai redraw sw=4"
+
+# VISUAL sets the "visual" editor, i.e., vi rather than ed, which if
+# set will be run by preference to $EDITOR by some software. It is
+# mostly historical and usually does not need to be set.
+#setenv        VISUAL  ${EDITOR}
+
+# Set the pager. This is used by, among other things, man(1) for
+# showing man pages. The default is "more". Another reasonable choice
+# (included with the system by default) is "less".
+#setenv        PAGER   more
+
+# Set your default printer, if desired.
+#setenv        PRINTER change-this-to-a-printer
+
+# Set the search path for programs.
+set path = (~/bin /bin /sbin /usr/{bin,sbin,X11R7/bin,X11R6/bin,pkg/{,s}bin,games} \
+           /usr/local/{,s}bin)
+
+if ($?prompt) then
+       # An interactive shell -- set some stuff up
+
+       # Filename completion.
+       set filec
+
+       # Size of the history buffer.
+       set history = 1000
+
+       # Do not exit on EOF condition (e.g. ^D typed)
+       # (disabled by default, not default behavior)
+       #set ignoreeof
+
+       # Set the location of your incoming email for mail notification.
+       set mail = (/var/mail/$USER)
+
+       # Set the prompt to include the hostname.
+       set mch = `hostname -s`
+       set prompt = "${mch:q}: {\!} "
+endif
diff --git a/etc/skel/dot.login b/etc/skel/dot.login
new file mode 100644 (file)
index 0000000..c65b0be
--- /dev/null
@@ -0,0 +1,21 @@
+#      $NetBSD: dot.login,v 1.3 2003/04/24 01:02:26 perry Exp $
+#
+# This is the default .login file.
+# Users are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed when a csh user first
+# logs in.  This file is processed after .cshrc.
+#
+# See csh(1) for details.
+#
+
+if ( ! $?SHELL ) then
+  setenv SHELL /bin/csh
+endif
+
+set noglob
+eval `tset -s -m 'network:?xterm'`
+unset noglob
+stty status '^T' crt -tostop
+
+if ( -x /usr/games/fortune ) /usr/games/fortune
diff --git a/etc/skel/dot.logout b/etc/skel/dot.logout
new file mode 100644 (file)
index 0000000..2c87831
--- /dev/null
@@ -0,0 +1,10 @@
+#      $NetBSD: dot.logout,v 1.1 2003/04/24 01:01:39 perry Exp $
+#
+# This is the default .logout file.
+# Users are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed when a csh login shell
+# terminates.
+#
+# See csh(1) for details.
+#
diff --git a/etc/skel/dot.profile b/etc/skel/dot.profile
new file mode 100644 (file)
index 0000000..ad8a20e
--- /dev/null
@@ -0,0 +1,41 @@
+#      $NetBSD: dot.profile,v 1.9 2012/04/10 19:02:30 dholland Exp $
+#
+# This is the default .profile file.
+# Users are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed when an sh user first
+# logs in.
+#
+# See sh(1) for details.
+#
+
+# Set your editor. Default to explicitly setting vi, as otherwise some
+# software will run ed and other software will fail. Can be set to
+# emacs or nano or whatever other editor you may prefer, but of course
+# those editors must be installed before you can use them.
+export EDITOR=vi
+
+# vi settings: set show-match auto-indent always-redraw shift-width=4
+#export EXINIT="se sm ai redraw sw=4"
+
+# VISUAL sets the "visual" editor, i.e., vi rather than ed, which if
+# set will be run by preference to $EDITOR by some software. It is
+# mostly historical and usually does not need to be set.
+#export VISUAL=${EDITOR}
+
+# Set the pager. This is used by, among other things, man(1) for
+# showing man pages. The default is "more". Another reasonable choice
+# (included with the system by default) is "less".
+#export PAGER=more
+
+# Set your default printer, if desired.
+#export PRINTER=change-this-to-a-printer
+
+# Set the search path for programs.
+PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/X11R6/bin:/usr/pkg/bin
+PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
+export PATH
+
+# Configure the shell to load .shrc at startup time.
+# This will happen for every shell started, not just login shells.
+export ENV=$HOME/.shrc
diff --git a/etc/skel/dot.shrc b/etc/skel/dot.shrc
new file mode 100644 (file)
index 0000000..2743f72
--- /dev/null
@@ -0,0 +1,10 @@
+#      $NetBSD: dot.shrc,v 1.3 2007/11/24 11:14:42 pavel Exp $
+
+if [ -f /etc/shrc ]; then
+       . /etc/shrc
+fi
+
+case "$-" in *i*)
+       # interactive mode settings go here
+       ;;
+esac
index dc12159ad9265cb4c0d6596785ed96d566fd65f3..59100bf7d49069061e0063c0952f3b603d38314b 100644 (file)
@@ -151,12 +151,8 @@ enum {
 #endif
 
 #ifndef DEF_SKELDIR
-#if defined(__minix)
-#define DEF_SKELDIR    "/usr/ast"
-#else
 #define DEF_SKELDIR    "/etc/skel"
 #endif
-#endif /* defined(__minix) */
 
 #ifndef DEF_SHELL
 #define DEF_SHELL      _PATH_BSHELL