Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jared94

#1
Hi,

I'm running OPNsense 23.7.10_1.

I'm trying to execute a custom bash script when a client connects to the DHCP server.

First I've changed the file /usr/local/etc/inc/plugins.inc.d/dhcpd.inc by adding:
$dhcpdconf .= 'on commit { execute("/etc/dhcpd/usr/local/sbin/oncommit", "commit"); }';

After DHCP restart from the GUI, the file /var/dhcpd/etc/dhcpd.conf is well modified with the new line.

Then I create a file /var/dhcpd/etc/dhcpd/usr/local/sbin/oncommit with 777 permission and dhcpd/dhcpd as user/group.

The result in the dhcpd log is :
QuoteUnable to execute /run/oncommit: No such file or directory

I've also try with a path that do not depend on the chroot dhcpd path with the same result.

Any help would be appreciate!