Skip to content

Commit

Permalink
Merge pull request #310 from DL6JJ/patch-2
Browse files Browse the repository at this point in the history
$FULLPAGEOS_OVERRIDE_PASSWORD overwrite VNC PW
  • Loading branch information
guysoft authored Dec 19, 2019
2 parents 111739b + 96ccca5 commit 7f034e4
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions src/modules/fullpageos/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,34 @@ fi
#override password
if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" != "default" ]
then
#root password
echo "pi:$FULLPAGEOS_OVERRIDE_PASSWORD" | chpasswd
# Set up x11vnc
sudo -u pi /home/pi/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD"
if [ ! -f /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
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

# Set up x11vnc
sudo -u pi /home/pi/scripts/setX11vncPass raspberry
if [ ! -f /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
echo "/home/pi/.vnc/passwd was not created again. Giving up."
echo "Failed to set a VNC password. Aborting build."
exit 1
fi
if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" == "default" ]
then
# Set up x11vnc
sudo -u pi /home/pi/scripts/setX11vncPass raspberry
if [ ! -f /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
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

#echo "sudo -u pi startx /home/pi/scripts/run_onepageos &" >> /etc/rc.local
Expand Down

0 comments on commit 7f034e4

Please sign in to comment.