From 1fb2bd675495ece3bb58fe8003dc67eaca7ace34 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 15 Jul 2022 15:21:26 +1000 Subject: tests: Add rudimentary debugging to dhclient-script We now supply a minimal dhclient-script of our own in the mbuto boot image. There are some problems with it, so add some basic logging to help debug it. Signed-off-by: David Gibson --- test/passt.mbuto | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/passt.mbuto b/test/passt.mbuto index 500c34f..fb59cec 100755 --- a/test/passt.mbuto +++ b/test/passt.mbuto @@ -21,11 +21,15 @@ LINKS="${LINKS:- ash,dash,bash /init ash,dash,bash /bin/sh}" -DIRS="${DIRS} /tmp /sbin" +DIRS="${DIRS} /tmp /sbin /var/log" FIXUP="${FIXUP}"' cat > /sbin/dhclient-script << EOF #!/bin/sh +LOG=/var/log/dhclient-script.log +echo \${reason} \${interface} >> \$LOG +set >> \$LOG + [ -n "\${new_interface_mtu}" ] && ip link set dev \${interface} mtu \${new_interface_mtu} [ -n "\${new_ip_address}" ] && ip addr add \${new_ip_address}/\${new_subnet_mask} dev \${interface} -- cgit v1.2.3