ソースを参照

Remove trailing spaces in user name

It's quite easy to make a mistake and add an additional space when configuring
users in the vncserver.users config file. You will then get an error that the
user doesn't exist and it's hard to spot the mistake. Same applies for a space
before the display number.
tags/v1.10.90
Jan Grulich 4年前
コミット
989491eb4b
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      unix/vncserver/vncsession-start.in

+ 1
- 1
unix/vncserver/vncsession-start.in ファイルの表示



DISPLAY="$1" DISPLAY="$1"


USER=`grep "^${DISPLAY}=" "${USERSFILE}" 2>/dev/null | head -1 | cut -d = -f 2-`
USER=`grep "^ *${DISPLAY}=" "${USERSFILE}" 2>/dev/null | head -1 | cut -d = -f 2- | sed 's/ *$//g'`


if [ -z "${USER}" ]; then if [ -z "${USER}" ]; then
echo "No user configured for display ${DISPLAY}" >&2 echo "No user configured for display ${DISPLAY}" >&2

読み込み中…
キャンセル
保存