Closed pyl96 closed 3 months ago
Yes, it seems that you still have the "old" Unifi odhcp6c, without the "-K" option, that's what the message means.
This is strange, because I'm in v3.2.12 (UDR) and I've got the -K version of odhcp6c (provided by Unifi OS).
Could it be that you're using a UXG-pro, and UXGs would have specific Unifi OS roadmaps (not identical to UDR/UDMs) ?
Anyway, you'll have to perform the step "On the UDM/UDR, build a version of odhcp6c supporting CoS" in order to have odhcp6c with the -K option...if you're using Orange of course (otherwise your ISP probably does not require CoS 6).
We're potentially in untested territory, though, as UXG-Pro series perhaps have different architectures / OS versions than UDR/UDMs, I hope that rebuilding this executable works as well as on UDR/UDMs.
odhcp6c -h show me the -K apt list --installed output: odhcp6c/now 1.0.1-341+gbcd283632ac arm64
From what I see, the script just check the presence of option -K for /data/local/bin/odhcp6c I don't have this file since I skipped this step so the error is more related to the absence of the file in my case.
ouch...yes...I read my script too quickly. And badly tested, as I've got the mod script in /data/local/bin as I previously built it, and kept it even when Unifi brought the new version...my bad.
SO
Until I fix the install script, in your cas you can comment this test line of install-dhcpv6-mod.sh (ie add a # in 1st colum) :
${mod_bin} -h 2>&1 | grep -q '\-K ' || errExit "${mod_bin} is NOT a valid modified ${bin_name} binary"
This is because the runtime script (odbcp6c.sh) is designed to handle both situations (old and new odhcp6c)... In install-dhcpv6-mod.sh :
I'm really sorry for the inconvenience, but the mod was developed when odhcp6c did not have -K and then later on Unifi added it...so the script has to cope with both situations and I did not properly test the install script then.
Don't worry, it's very kind of you to create, share and maintain this script ! Willl test it on my UXG-Pro and post the result here.
Just tested and now when I do: grep -E 'dhcpc|odhcp6c|dhcpv6-mod' /var/log/daemon.log
I have this error: [dhcpv6-mod] ERROR: could not find odhcp6c executable /data/local/bin/odhcp6c
There is no /usr/sbin/odhcp6c-org (only odhcp6c) so /data/local/bin/odhcp6c is used
/usr/sbin/odhcp6c was not copied to /usr/sbin/odhcp6c-org because the command file doesn't seems to exist: ./install-dhcpv6-mod.sh: line 130: file: command not found
An easy fix would be to add the command to the doc in the 2nd step
I built odhcp6c to resolv the issue and it works so your method is fully compatible with UXG-Pro too
I haven't had time to fix the install script yet, and yes, the "file" package is mandatory because this is how I test whether /usr/sbin/odhcp6c is Unifi's executable or our replacement script.
So apt install file
is to be performed in all cases for install-dhcpv6-mod.sh
to work
All that goes back to the fact that the install script has not been properly tested with a new user like you which has got the new Unifi odhcp6c in the first place, without performing the rebuild phase.
In addition, I should have tested whether the "file" package is installed or not...
I'll fix all that ASAP tonight but right now not possible, please bare with me :)
Take all the time you want man ! Thank you for your time and a have a nice day ! :)
Fixed in https://github.com/fgero/dhcpv6-mod/commit/684daca3e41e2db306b47cca09f7176cfcb9dbf8 and additional https://github.com/fgero/dhcpv6-mod/commit/1253f564a025f25c45f4bc86149f78bf5f69fcab. One day I'll have to clean up the useless complexity of supporting both old versions of UnifiOS (ie : odhcp6c without -K) and new ones.
Hardware: UXG-Pro ( maybe not supported by this proc ? ) Version: v3.2.15
I am in a version newer than v3.2.9 so I skipped the step "On the UDM/UDR, build a version of odhcp6c supporting CoS"
When I run ./install-dhcpv6-mod.sh I have this error : [dhcpv6-mod] ERROR: /data/local/bin/odhcp6c is NOT a valid modified odhcp6c binary
Did I do something wrong or the script need to be modified to fit this case ?