aboutgitcodebugslistschat
path: root/test/passt.mbuto
diff options
context:
space:
mode:
authorJon Paul Maloy <jmaloy@redhat.com>2023-12-14 16:12:19 -0500
committerStefano Brivio <sbrivio@redhat.com>2023-12-27 19:33:31 +0100
commitf0ccca741f641ff0a6abc2bf9c43eb834b284014 (patch)
treef7df410f5019670fed985e477aed62400278cf9d /test/passt.mbuto
parent6a348cb435ce05d9da5348246eff867774d150d6 (diff)
downloadpasst-f0ccca741f641ff0a6abc2bf9c43eb834b284014.tar
passt-f0ccca741f641ff0a6abc2bf9c43eb834b284014.tar.gz
passt-f0ccca741f641ff0a6abc2bf9c43eb834b284014.tar.bz2
passt-f0ccca741f641ff0a6abc2bf9c43eb834b284014.tar.lz
passt-f0ccca741f641ff0a6abc2bf9c43eb834b284014.tar.xz
passt-f0ccca741f641ff0a6abc2bf9c43eb834b284014.tar.zst
passt-f0ccca741f641ff0a6abc2bf9c43eb834b284014.zip
test: make passt.mbuto script more robust
Creation of a symbolic link from /sbin to /usr/sbin fails if /sbin exists and is non-empty. This is the case on Ubuntu-23.04. We fix this by removing /sbin before creating the link. Signed-off-by: Jon Maloy <jmaloy@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/passt.mbuto')
-rwxr-xr-xtest/passt.mbuto4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/passt.mbuto b/test/passt.mbuto
index 90816d2..75d1260 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -26,6 +26,9 @@ DIRS="${DIRS} /tmp /sbin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.
COPIES="${COPIES} small.bin,/root/small.bin medium.bin,/root/medium.bin big.bin,/root/big.bin"
FIXUP="${FIXUP}"'
+ mv /sbin/* /usr/sbin || :
+ rm -rf /sbin
+ ln -s /usr/sbin /sbin
cat > /sbin/dhclient-script << EOF
#!/bin/sh
LOG=/var/log/dhclient-script.log
@@ -47,7 +50,6 @@ set >> \$LOG
exit 0
EOF
chmod 755 /sbin/dhclient-script
- ln -s /sbin /usr/sbin
ln -s /bin /usr/bin
ln -s /run /var/run
:> /etc/fstab