git: 5575d5a5486d - main - dhclient: fix pcp:pcp cleanup failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 09:11:11 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=5575d5a5486d6065099fb4c25d27fec01df3dc35
commit 5575d5a5486d6065099fb4c25d27fec01df3dc35
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-06-17 07:01:05 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-06-17 07:10:52 +0000
dhclient: fix pcp:pcp cleanup failure
If isc-dhcp44-server is not installed (as is the case the project's CI
servers) we don't create ngctl.shutdown, causing the 'rm' to fail.
That in turn causes the cleanup function to return non-zero, which
causes kyua to consider the test failed.
Use 'rm -f' instead, so we don't error even if the file doesn't exist.
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
sbin/dhclient/tests/pcp.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/dhclient/tests/pcp.sh b/sbin/dhclient/tests/pcp.sh
index 88c39f452f7f..4875a10a10ce 100644
--- a/sbin/dhclient/tests/pcp.sh
+++ b/sbin/dhclient/tests/pcp.sh
@@ -185,7 +185,7 @@ pcp_cleanup()
for i in $(cat ngctl.shutdown); do
ngctl shutdown ${i}:
done
- rm ngctl.shutdown
+ rm -f ngctl.shutdown
}
atf_init_test_cases()