|
85 | 85 | #override password |
86 | 86 | if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" != "default" ] |
87 | 87 | then |
| 88 | + #root password |
88 | 89 | echo "pi:$FULLPAGEOS_OVERRIDE_PASSWORD" | chpasswd |
| 90 | + # Set up x11vnc |
| 91 | + sudo -u pi /home/pi/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD" |
| 92 | + if [ ! -f /home/pi/.vnc/passwd ]; then |
| 93 | + echo "/home/pi/.vnc/passwd was not created. Trying again." |
| 94 | + sudo -u pi /home/pi/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD" |
| 95 | + if [ ! -f /home/pi/.vnc/passwd ]; then |
| 96 | + echo "/home/pi/.vnc/passwd was not created again. Giving up." |
| 97 | + echo "Failed to set a VNC password. Aborting build." |
| 98 | + exit 1 |
| 99 | + fi |
| 100 | + fi |
89 | 101 | fi |
90 | 102 |
|
91 | | -# Set up x11vnc |
92 | | -sudo -u pi /home/pi/scripts/setX11vncPass raspberry |
93 | | -if [ ! -f /home/pi/.vnc/passwd ]; then |
94 | | - echo "/home/pi/.vnc/passwd was not created. Trying again." |
95 | | - sudo -u pi /home/pi/scripts/setX11vncPass raspberry |
96 | | - if [ ! -f /home/pi/.vnc/passwd ]; then |
97 | | - echo "/home/pi/.vnc/passwd was not created again. Giving up." |
98 | | - echo "Failed to set a VNC password. Aborting build." |
99 | | - exit 1 |
100 | | - fi |
| 103 | +if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" == "default" ] |
| 104 | +then |
| 105 | + # Set up x11vnc |
| 106 | + sudo -u pi /home/pi/scripts/setX11vncPass raspberry |
| 107 | + if [ ! -f /home/pi/.vnc/passwd ]; then |
| 108 | + echo "/home/pi/.vnc/passwd was not created. Trying again." |
| 109 | + sudo -u pi /home/pi/scripts/setX11vncPass raspberry |
| 110 | + if [ ! -f /home/pi/.vnc/passwd ]; then |
| 111 | + echo "/home/pi/.vnc/passwd was not created again. Giving up." |
| 112 | + echo "Failed to set a VNC password. Aborting build." |
| 113 | + exit 1 |
| 114 | + fi |
| 115 | + fi |
101 | 116 | fi |
102 | 117 |
|
103 | 118 | #echo "sudo -u pi startx /home/pi/scripts/run_onepageos &" >> /etc/rc.local |
|
0 commit comments