Skip to content

Commit

Permalink
Better testing for x11 password, fixes #408
Browse files Browse the repository at this point in the history
  • Loading branch information
guysoft committed Mar 2, 2022
1 parent 5576f3f commit 2cb1f8a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/fullpageos/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,28 @@ then
if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" != "default" ]
then
sudo -u pi /home/pi/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD"
if [ ! -f /home/pi/.vnc/passwd ]; then
if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then
echo "/home/pi/.vnc/passwd was not created. Trying again."
sudo -u pi /home/pi/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD"
if [ ! -f /home/pi/.vnc/passwd ]; then
if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then
echo "/home/pi/.vnc/passwd was not created again. Giving up."
echo "Failed to set a VNC password. Aborting build."
exit 1
fi
fi
else
sudo -u pi /home/pi/scripts/setX11vncPass raspberry
if [ ! -f /home/pi/.vnc/passwd ]; then
if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then
echo "/home/pi/.vnc/passwd was not created. Trying again."
sudo -u pi /home/pi/scripts/setX11vncPass raspberry
if [ ! -f /home/pi/.vnc/passwd ]; then
if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then
echo "/home/pi/.vnc/passwd was not created again. Giving up."
echo "Failed to set a VNC password. Aborting build."
exit 1
fi
fi
fi
ls -l /home/pi/.vnc/passwd

#Enable x11vnc service
systemctl enable x11vnc.service
Expand Down

0 comments on commit 2cb1f8a

Please sign in to comment.