Closed dkebler closed 6 years ago
I just commented out the whole block and the install finished. I'd suggest making those && or doing a separate if for each file to remove it individually. Then if someone like make removes some manually you'll only remove the remaining stuff.
# if [ -L $(LDIR)/fanctl.so ] || [ -L $(LDIR)/sleep.so ] || [ -f $(LDIR)/fanctl.so.?.? ] || [ -f $(LDIR)/sleep.so.?.? ];then \
# echo "V0.1.6 or older detected, Removing it from System.."; \
# systemctl stop fanctl 1> /dev/null 2>&1; \
# systemctl disable fanctl 1> /dev/null 2>&1; \
# journalctl -u fanctl --rotate 1> /dev/null 2>&1; \
# sync && sleep 1; \
# journalctl -u fanctl --vacuum-time=1s 1> /dev/null 2>&1; \
# find /{lib/systemd/system,usr/{sbin,lib/${TRIPLET}/lua/5.3}} -name fanctl -o -name sleep.so\* -o -name fanctl.service -exec rm -v {} \; \
# ;fi
Hello dkebler, Thanks for reporting that,
I checked the remove procedure, but something went wrong.. In shell it executes fine, in Makefile don't.. The problem was other thing..
It doesn't expanded this '/{lib/systemd/system,usr/{sbin,lib/${TRIPLET}/lua/5.3}}' to this '/lib/systemd/system /usr/sbin /usr/lib/${TRIPLET}/lua/5.3' .
this problem is wierd, Because in shell it has a different behaviour..any way.. I hard-coded, find, with the full paths separated ( '/lib/systemd/system /usr/sbin /usr/lib/${TRIPLET}/lua/5.3' )
Now, it seems ok. You can check install a 0.1.6 version and then later install the master-0 one. You will see the print output, of removing files, on detection..
Also, I hade forget to update the luarocks config file, tu automatically assign triplet, its now done!
Building from source. I did have old fanctl code loaded but manually removed the binary and service before finding this new version
There is no directory
/lua
underaarch64-linux-gnu
Makefile is looking for old stuff to erase and the directory doesn't exist find /{lib/systemd/system,usr/{sbin,lib/${TRIPLET}/lua/5.3}} -name fanctl -o -name sleep.so* -o -name fanctl.service -exec rm -v {} \; \
The if statement is uses || so it's finding some of those but not all so it drops in and then the error occurs.