]> source.dussan.org Git - tigervnc.git/commitdiff
Removed shell dependency from el6 vncserver init script. Fixes bug tracker bug #141.
authorBrian Hinz <bphinz@users.sourceforge.net>
Mon, 24 Mar 2014 02:56:45 +0000 (02:56 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Mon, 24 Mar 2014 02:56:45 +0000 (02:56 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5176 3789f03b-4d11-0410-bbf8-ca57d06f2519

contrib/packages/rpm/el6/SOURCES/vncserver.service

index 880261fdff282d54f182806b975dea46acc6c8f7..51439de88bfe7d46dd34c7412b0ed8386f5f15ae 100644 (file)
@@ -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 "