emonpi
emonpi copied to clipboard
Recursive symlink in filesystem - /opt/openenergymonitor/emonhub/src/src
I recently installed emonSD-24Jul20, and one of my ansible jobs is complaining about a recursive symlink in /opt. If I remove it it gets recreated, so it appears something is creating it at either install or upgrade. The problem is that /opt/openenergymonitor/emonhub/src/src is symlinked to /opt/openenergymonitor/emonhub/src, which causes anything walking the filesystem to end up in a recursive loop.
> ls -l /opt/openenergymonitor/emonhub/src/
total 72
-rw-r--r-- 1 pi pi 922 Aug 19 2020 Cargo.py
-rw-r--r-- 1 pi pi 2821 Jun 26 23:23 emonhub_buffer.py
-rw-r--r-- 1 pi pi 913 Jun 26 23:23 emonhub_coder.py
-rw-r--r-- 1 pi pi 23667 Jun 26 23:23 emonhub_interfacer.py
-rwxr-xr-x 1 pi pi 12802 Jun 26 23:23 emonhub.py*
-rw-r--r-- 1 pi pi 4412 Jun 26 23:23 emonhub_setup.py
drwxr-xr-x 2 pi pi 4096 Jun 26 23:23 goodwe/
drwxr-xr-x 3 pi pi 4096 Jun 26 23:23 interfacers/
drwxr-xr-x 2 pi pi 4096 Jun 26 23:23 smalibrary/
lrwxrwxrwx 1 root root 34 Jun 29 20:39 src -> /opt/openenergymonitor/emonhub/src/
I haven't been able to find what might be creating the symlink. The only obvious link commands are in emonnhub/install.sh and emonpi/update.sh, and those are both linking to the src directory so shouldn't be creating a new link in the src directory.