From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 40B0D5A026F for ; Thu, 14 Dec 2023 22:12:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702588344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/3SP4wlYH24RFBlg/Yx4i9qoEwtAM/rxH0XRGEtGVs=; b=hAOWUkjxRIdsE/FSZidawSZGnzeUzjenZdUixc4MtgbvqAL7pXJeQZ6niuRdWvhgSB5qeD SEr2JaVKdpiYvo08cw0+sJyKmp7v7/PdyMxJVl5bB1hRAwe7vpNgEFDrFCeNyTaBpswTS7 ES+tolQTVYZpmEjmXsIoPzfwxSNQdT8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-qX1v5tLDNcuZDCZZ9pDDbw-1; Thu, 14 Dec 2023 16:12:23 -0500 X-MC-Unique: qX1v5tLDNcuZDCZZ9pDDbw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6AFB3C2E0A3 for ; Thu, 14 Dec 2023 21:12:22 +0000 (UTC) Received: from fenrir.redhat.com (unknown [10.22.32.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5464A1C060B1; Thu, 14 Dec 2023 21:12:22 +0000 (UTC) From: Jon Maloy To: passt-dev@passt.top, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com, jmaloy@redhat.com Subject: [PATCH v2] test: make passt.mbuto script more robust Date: Thu, 14 Dec 2023 16:12:19 -0500 Message-ID: <20231214211219.127144-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: JILXUJSNGON5CGB6YRFG4LBBCNBFH3LM X-Message-ID-Hash: JILXUJSNGON5CGB6YRFG4LBBCNBFH3LM X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Jon Paul Maloy 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 --- v2: Move the contents of /sbin to /usr/sbin before creating the link. Signed-off-by: Jon Maloy --- test/passt.mbuto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.2