Blake is correct; the path is hard-coded in some of the leases, so that MAAS knows what binary to call when the lease expires, such as:
lease 172.16.100.150 { starts 1 2017/03/27 21:42:51; ends 1 2017/03/27 21:44:51; tstp 1 2017/03/27 21:44:51; cltt 1 2017/03/27 21:42:51; binding state free; hardware ethernet 0c:c4:7a:c0:31:fa; set vendor-class-identifier = "Linux ipconfig"; client-hostname "skylake"; on expiry { set clhw = binary-to-ascii (16, 8, ":", substring (hardware, 1, 6)) ; set clip = binary-to-ascii (10, 8, ".", leased-address) ; execute ("/usr/sbin/maas-dhcp-helper", "notify", "--action", "expiry", "--mac", clhw, "--ip-family", "ipv4", "--ip", clip); } on release { set clhw = binary-to-ascii (16, 8, ":", substring (hardware, 1, 6)) ; set clip = binary-to-ascii (10, 8, ".", leased-address) ; execute ("/usr/sbin/maas-dhcp-helper", "notify", "--action", "release", "--mac", clhw, "--ip-family", "ipv4", "--ip", clip); } }
So I don't think we can move this around.
« Back to merge proposal
Blake is correct; the path is hard-coded in some of the leases, so that MAAS knows what binary to call when the lease expires, such as:
lease 172.16.100.150 { class-identifie r = "Linux ipconfig";
binary- to-ascii (16, 8, ":",
substring (hardware, 1, 6)) ;
binary- to-ascii (10, 8, ".", leased-address) ; sbin/maas- dhcp-helper" , "notify", "--action", "expiry",
binary- to-ascii (16, 8, ":",
substring (hardware, 1, 6)) ;
binary- to-ascii (10, 8, ".", leased-address) ; sbin/maas- dhcp-helper" , "notify", "--action", "release",
starts 1 2017/03/27 21:42:51;
ends 1 2017/03/27 21:44:51;
tstp 1 2017/03/27 21:44:51;
cltt 1 2017/03/27 21:42:51;
binding state free;
hardware ethernet 0c:c4:7a:c0:31:fa;
set vendor-
client-hostname "skylake";
on expiry {
set clhw =
set clip =
execute ("/usr/
"--mac", clhw, "--ip-family", "ipv4", "--ip", clip);
}
on release {
set clhw =
set clip =
execute ("/usr/
"--mac", clhw, "--ip-family", "ipv4", "--ip", clip);
}
}
So I don't think we can move this around.