You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Software (please complete the following information):
FOG version 1.5.10.1629
OS: Ubuntu Server 24.04 LTS
Additional context
The problem is located in the functions script (/fogproject/lib/common/functions.sh) at line 255. The command ip -4 addr show | grep -w inet | grep $interface | awk '{print $4}' returns "global" when run on ubuntu. When fed into the function "subtract1fromAddress" this will return an "Invalid IP Passed" error which is in turn pasted into the dhcpd.conf file and causes the dhcp service to fail due to misconfiguration.
My solution was to replace line 255 in /fogproject/lib/common/functions.sh with the following:
echo $(ip -4 addr show | grep -w inet | grep eno2 | awk '{print $2}' | sed 's/...$//')
I can't say if this works for other distro's or versions of Ubuntu but this fixed the issue with Ubuntu Server 24.04 LTS.
The text was updated successfully, but these errors were encountered:
Your call get's the actual devices' IP address, not the broadcast which is where we're trying to get the device from.
Your code also specifically indicates the interface name, which for your system is eno2, but for someone else it might be eth0 or enps01p0 or any other series of information that indicates the name of its interface. So while I'm glad you found a solution for your specific scenario I think a more dynamic approach will work. Hopefully:
I've made a change to how this code gets the broadcast address and should be more consistent across platforms as well.
Can you please try dev-branch (or wait a day and try the stable branch) and see if this is working more consistently for you as well? Thank you in advance.
Describe the bug
The bug is identical to this one: #593
During install the DHCP configuration script fails to correctly set the IP ranges.
To Reproduce
Steps to reproduce the behavior:
Software (please complete the following information):
Additional context
The problem is located in the functions script (/fogproject/lib/common/functions.sh) at line 255. The command
ip -4 addr show | grep -w inet | grep $interface | awk '{print $4}'
returns "global" when run on ubuntu. When fed into the function "subtract1fromAddress" this will return an "Invalid IP Passed" error which is in turn pasted into the dhcpd.conf file and causes the dhcp service to fail due to misconfiguration.My solution was to replace line 255 in /fogproject/lib/common/functions.sh with the following:
echo $(ip -4 addr show | grep -w inet | grep eno2 | awk '{print $2}' | sed 's/...$//')
I can't say if this works for other distro's or versions of Ubuntu but this fixed the issue with Ubuntu Server 24.04 LTS.
The text was updated successfully, but these errors were encountered: