diff options
author | Brian Hinz <bphinz@users.sourceforge.net> | 2014-03-24 02:56:45 +0000 |
---|---|---|
committer | Brian Hinz <bphinz@users.sourceforge.net> | 2014-03-24 02:56:45 +0000 |
commit | 2e333bc3dafda3bf0b7ffe3f075fa671dbf47f6f (patch) | |
tree | f68c713e49787e1d70dce18abc52d00b1669429b | |
parent | b27264f5b256f376278f0489c56296d5c138efb8 (diff) | |
download | tigervnc-2e333bc3dafda3bf0b7ffe3f075fa671dbf47f6f.tar.gz tigervnc-2e333bc3dafda3bf0b7ffe3f075fa671dbf47f6f.zip |
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
-rw-r--r-- | contrib/packages/rpm/el6/SOURCES/vncserver.service | 31 |
1 files changed, 15 insertions, 16 deletions
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 " |