aboutgitcodebugslistschat
path: root/test/demo
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-06-10 12:32:43 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-06-15 09:38:10 +0200
commitca0c33ae5b8a68806dd1c766e2f58ce24867f334 (patch)
treebdabe0027c287d1b3d2617a175b66f281dc389c6 /test/demo
parent2320ac3349789551e9c7500dba03e04b9ac02f41 (diff)
downloadpasst-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.tar
passt-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.tar.gz
passt-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.tar.bz2
passt-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.tar.lz
passt-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.tar.xz
passt-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.tar.zst
passt-ca0c33ae5b8a68806dd1c766e2f58ce24867f334.zip
Tweak dhclient arguments for readability
A number of tests and examples use dhclient in both IPv4 and IPv6 modes. We use "dhclient -6" for IPv6, but usually just "dhclient" for IPv4. Add an explicit "-4" argument to make it more clear and explicit. In addition, when dhclient is run from within pasta it usually won't be "real" root, and so will not have access to write the default global pid file. This results in a mostly harmless but irritating error: Can't create /var/run/dhclient.pid: Permission denied We can avoid that by using the --no-pid flag to dhclient. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/demo')
-rw-r--r--test/demo/passt6
-rw-r--r--test/demo/pasta6
2 files changed, 6 insertions, 6 deletions
diff --git a/test/demo/passt b/test/demo/passt
index d394a08..ee4e7c2 100644
--- a/test/demo/passt
+++ b/test/demo/passt
@@ -73,9 +73,9 @@ sleep 3
passt cd __TEMPDIR__/passt
passtb ./pasta
sleep 3
-passt /sbin/dhclient
+passt /sbin/dhclient -4 --no-pid
sleep 2
-passt /sbin/dhclient -6
+passt /sbin/dhclient -6 --no-pid
sleep 2
nl
@@ -112,7 +112,7 @@ guest ip link show
sleep 3
say Guest is up. Let's configure IPv4 first...
sleep 2
-guest dhclient
+guest dhclient -4
sleep 2
guest ip addr show
sleep 5
diff --git a/test/demo/pasta b/test/demo/pasta
index 8b13b5e..e2517ed 100644
--- a/test/demo/pasta
+++ b/test/demo/pasta
@@ -77,7 +77,7 @@ ns ip link show
sleep 3
say Let's configure IPv4 first...
sleep 2
-ns dhclient
+ns dhclient -4 --no-pid
sleep 2
ns ip addr show
sleep 5
@@ -87,7 +87,7 @@ say SLAAC is already done, but we can also
nl
say get another address via DHCPv6.
sleep 3
-ns dhclient -6
+ns dhclient -6 --no-pid
sleep 3
nl
@@ -146,7 +146,7 @@ temp TEMP
passtb ./pasta -p __TEMP__.pcap
sleep 2
passt
-passt /sbin/dhclient
+passt /sbin/dhclient -4 --no-pid
sleep 2
hostb tshark -r __TEMP__.pcap
sleep 5