summaryrefslogtreecommitdiff
path: root/src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-01-15 00:55:32 +0000
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-01-15 08:54:24 +0000
commitb4e0c1b6a35b18d47a8324addbbb99b473f6511a (patch)
tree9d2fc8a33b14e27e0368331d5a957b7273ddae00 /src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook
parent396adffb3fc0611ca2ad2d300b282a70641a901f (diff)
downloadvyos-1x-b4e0c1b6a35b18d47a8324addbbb99b473f6511a.tar.gz
vyos-1x-b4e0c1b6a35b18d47a8324addbbb99b473f6511a.zip
T5901: Add DHCP base_path dir during first boot
We should create dhclient base_path dir `/run/dhclient` during the first boot. It fixes cloud-init boot issues ``` /etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook: line 33: /run/dhclient/dhclient_eth0.lease: No such file or directory ``` (cherry picked from commit e613983721c48c13c2e6e73e7c4dbdbaa8e9eacf)
Diffstat (limited to 'src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook')
-rw-r--r--src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook b/src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook
index 35721d009..d5e6462ba 100644
--- a/src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook
+++ b/src/etc/dhcp/dhclient-exit-hooks.d/03-vyos-dhclient-hook
@@ -29,6 +29,7 @@ fi
if [ "$RUN" = "yes" ]; then
BASE_PATH=$(python3 -c "from vyos.defaults import directories; print(directories['isc_dhclient_dir'])")
+ mkdir -p ${BASE_PATH}
LOG=${BASE_PATH}/dhclient_"$interface"."$proto"lease
echo `date` > $LOG