From: Brian Hinz Date: Mon, 24 Mar 2014 02:56:45 +0000 (+0000) Subject: Removed shell dependency from el6 vncserver init script. Fixes bug tracker bug #141. X-Git-Tag: v1.3.90~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2e333bc3dafda3bf0b7ffe3f075fa671dbf47f6f;p=tigervnc.git Removed shell dependency from el6 vncserver init script. Fixes bug tracker bug #141. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5176 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/contrib/packages/rpm/el6/SOURCES/vncserver.service b/contrib/packages/rpm/el6/SOURCES/vncserver.service index 880261fd..51439de8 100644 --- a/contrib/packages/rpm/el6/SOURCES/vncserver.service +++ b/contrib/packages/rpm/el6/SOURCES/vncserver.service @@ -45,22 +45,21 @@ start() { for display in ${VNCSERVERS} do - SERVS=1 - echo -n "${display} " - DISP="${display%%:*}" - USER="${display##*:}" - VNCUSERARGS="${VNCSERVERARGS[${DISP}]}" - runuser -l ${USER} -c \ - "cd ~${USER} && - if [ -r .vnc/passwd ]; then - vncserver :${DISP} ${VNCUSERARGS} - else - echo - echo VNC password for user ${USER} is not configured - exit 1; - fi;" - RETVAL=$? - [ "$RETVAL" -eq 0 ] || break + SERVS=1 + echo -n "${display} " + DISP="${display%%:*}" + USER="${display##*:}" + VNCUSERARGS="${VNCSERVERARGS[${DISP}]}" + if [ -r $(eval echo ~${USER})/.vnc/passwd ]; then + runuser -l ${USER} -c \ + "cd ~${USER} && vncserver :${DISP} ${VNCUSERARGS}" + RETVAL=$? + else + echo + echo VNC password for user ${USER} is not configured + RETVAL=1 + fi + [ "$RETVAL" -eq 0 ] || break done if [ -z "$SERVS" ]; then echo -n "no displays configured "