diff options
-rwxr-xr-x | sourceroot/bin/dhcp-query | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sourceroot/bin/dhcp-query b/sourceroot/bin/dhcp-query new file mode 100755 index 0000000..be1b354 --- /dev/null +++ b/sourceroot/bin/dhcp-query @@ -0,0 +1,13 @@ +#!/bin/sh + +# A simple plug for dhcp for better-initramfs. +# Pass thru what udhcpc pass to script into a file for inclusion. + +exec > /dhcp-query-result + +case "$1" in + 'renew'|'bound') + printf 'binit_net_addr=%s\n' "${ip}/${mask}" + printf 'binit_net_gw=%s\n' "${router}" + ;; +esac |