Merge branch 'feature/udhcpc-hostname-script-client' into master

This commit is contained in:
Ariadne Conill 2020-09-11 02:43:58 -06:00
commit aba546cf8e

View file

@ -8,7 +8,8 @@ tests_init udhcpc_up \
dhcpcd_down \ dhcpcd_down \
dhclient_up \ dhclient_up \
udhcpc_opts_up \ udhcpc_opts_up \
udhcpc_opts_up_subshell udhcpc_opts_up_subshell \
hostname_subshell
udhcpc_up_body() { udhcpc_up_body() {
export IFACE=eth0 PHASE=up MOCK=echo IF_DHCP_PROGRAM=udhcpc export IFACE=eth0 PHASE=up MOCK=echo IF_DHCP_PROGRAM=udhcpc
@ -45,3 +46,9 @@ udhcpc_opts_up_subshell_body() {
atf_check -s exit:0 -o match:'/sbin/udhcpc -b -R -p /var/run/udhcpc.eth0.pid -i eth0 -O search -x hostname:test' \ atf_check -s exit:0 -o match:'/sbin/udhcpc -b -R -p /var/run/udhcpc.eth0.pid -i eth0 -O search -x hostname:test' \
${EXECUTOR} ${EXECUTOR}
} }
hostname_subshell_body() {
export IFACE=eth0 PHASE=up MOCK=echo IF_DHCP_PROGRAM=udhcpc IF_HOSTNAME="\$(echo test)"
atf_check -s exit:0 -o match:'/sbin/udhcpc -b -R -p /var/run/udhcpc.eth0.pid -i eth0 -x hostname:test' \
${EXECUTOR}
}