KeepOCPN_conf_Tidy.pdf (Size: 11.17 KB / Downloads: 215)
next and final step :
I have added, as ROOT, that line to /etc/RC.locale :
Code:
/home/pi/KeepOCPN_conf_Tidy
Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
/home/pi/KeepOCPN_conf_Tidy
chmod 755 /media/pi
exit 0
Let us control its perfect operational condition :
- delete the copy of opencpn.conf from the directory /home/pi/Sauvegardes (if any)
- reboot the RPi, quit OpenCPN if it started ;
- check that file opencpn.conf is back in the directory /home/pi/Sauvegardes, its magic !
- Open in text editor the file /home/pi/.opencpn/opencpn.conf, Select all, delette, save, quit (yes, corrupt opencpn.conf, and check its lengh is Zero.
- reboot the RPi
- OpenCPN starts like charm ! nothing to reconfigure ...Quit OpenCPN, and check the length of opencpn.conf which should be some k (16k in my case).
The only drawback in case of corruption is you will have the configuration of your previous session ..., which is much better than no configuration at all !
I have stamped my desktop with this GOLD rule :
Always quit OpenCPN before stopping the system !
To summarize :
- create in /home/pi a directory Sauvegardes ; it will accommodate the config file backups
- copy the file KeepOCPN_conf-Tidy (*) in /home/pi, adjust its properties/access rights in fileman : Right to execute : everybody
- copy the file etc/rc.locale to etc/rc.locale.orig
- Add the line in etc/rc.locale as ROOT as explained above
- Apply above 6 steps control procedure, and you're done !
- and remember : always quit OpenCPN before stopping the system !
EDIT : see next post
Cordialement
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN 5.8.4 : Thank you Thank you Thank you
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN 5.8.4 : Thank you Thank you Thank you