Possible workaround for error: netifd: wan (5468): ./dhcp.sh: eval: line 45: hexdump_2hex: not found

I didn't want to muck up the 25.12.4 thread, so created this seperate one.
Possible workaround by manually adding a hexdump_2hex wrapper.

Verify hexdump is installed

# which hexdump
/usr/bin/hexdump

Manually add a wrapper to /lib/functions.sh

hexdump_2hex() {
    hexdump -ve '1/1 "%02x"'
}

I added this nearer the end of the functions.sh file and saved.

Restart network:

/etc/init.d/network restart

Testing wrapper from command line:

root@TestDevice:# . /lib/functions.sh
root@TestDevice:#: echo -n "Motorola" | hexdump_2hex

Output was: 4d6f746f726f6c61

My ISP does not require DHCP option 60 / Vendor ID - so I don't actually have the issue. I just wanted to look into a workaround though. If you have the issue, and this works for you, please let me know.

It looks like there is already a hexdump_2hex perhaps it is not doing the correct substitution?

See: https://github.com/search?q=repo%3Aopenwrt%2Fopenwrt%20hexdump_2hex&type=code

Maybe the intention was to replace it altogether?

I'm not a dev, so I might not be interpreting this correctly.

Since we modifyfunctions.sh locally anyway, we might as well add the function from GitHub. Just keep in mind that a sysupgrade will overwrite it with the original version.

It works for me, but an attended sysupgrade doesn't fetch the correct version of functions.sh at the moment.