Browse Source

lib/libsde.in: replaced the getent call with grep.

master
Nagy Károly Gábriel 8 years ago
parent
commit
c5b59392b3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/libsde.in

+ 2
- 2
lib/libsde.in

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/libsde.in
# Copyright (C) 2006 - 2015 The OpenSDE Project
# Copyright (C) 2006 - 2016 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -25,7 +25,7 @@ sdever=$("$SDEROOT/lib/version.sh")
#
if [ -z "$SDESETTINGS" ]; then
if [ -n "$SUDO_USER" ]; then
SDESETTINGS="$( getent passwd $SUDO_USER | cut -d: -f6)/.sde/settings"
SDESETTINGS="$( grep -m 1 "^$SUDO_USER:" /etc/passwd | cut -d: -f6)/.sde/settings"
else
SDESETTINGS="$HOME/.sde/settings"
fi

Loading…
Cancel
Save