Se você estiver usando o DHCP, talvez queira verificar & amp; considere o seguinte,
Fontes:
Fóruns do Ubuntu: Executar o script após o ip do dhcpd designado ao cliente
SuperUser: executando-a-script-when-dhcpd-give -an-ip
dhcpd.conf
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac));
execute("/usr/sbin/my_script_here", "commit", ClientIP, ClientMac);
}