Browse Source

Simplify setting the USER and UID variables.

While here, convert `` to $().
OK halex
OPENBSD_6_1
rpe 8 years ago
parent
commit
28d5c57ffe
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      src/etc/ksh.kshrc

+ 3
- 4
src/etc/ksh.kshrc View File

@ -1,5 +1,5 @@
:
# $OpenBSD: ksh.kshrc,v 1.24 2016/09/10 08:42:06 rpe Exp $
# $OpenBSD: ksh.kshrc,v 1.25 2016/09/10 09:44:49 rpe Exp $
#
# NAME:
# ksh.kshrc - global initialization for ksh
@ -33,9 +33,8 @@
case "$-" in
*i*) # we are interactive
# we may have su'ed so reset these
USER=`whoami 2>/dev/null`
USER=${USER:-`id | sed 's/^[^(]*(\([^)]*\)).*/\1/'`}
UID=`id -u`
USER=$(id -un)
UID=$(id -u)
case $UID in
0) PS1S='# ';;
esac


Loading…
Cancel
Save