diff options
author | KARBOWSKI Piotr <piotr.karbowski@gmail.com> | 2018-05-13 19:44:06 +0200 |
---|---|---|
committer | KARBOWSKI Piotr <piotr.karbowski@gmail.com> | 2018-05-13 19:44:06 +0200 |
commit | 60640053d74fc72a06188a7fa1bb43b8f8c4cd29 (patch) | |
tree | 768993a0678b1e12c173db7e28b671521c64aabd | |
parent | sourceroot/functions.sh: support dhcp (diff) | |
download | better-initramfs-60640053d74fc72a06188a7fa1bb43b8f8c4cd29.tar.xz better-initramfs-60640053d74fc72a06188a7fa1bb43b8f8c4cd29.zip |
dhcp-query: dhcp helper.
-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 |