Fix wireless_disable_interface remediations to work multiple interfaces - #15106
alanmcanonical wants to merge 4 commits into
Conversation
Signed-off-by: Alan Moore <alan.moore@canonical.com>
|
Hi @alanmcanonical. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Signed-off-by: Alan Moore <alan.moore@canonical.com>
|
This datastream diff is auto generated by the check Click here to see the full diffbash remediation for rule 'xccdf_org.ssgproject.content_rule_wireless_disable_interfaces' differs.
--- xccdf_org.ssgproject.content_rule_wireless_disable_interfaces
+++ xccdf_org.ssgproject.content_rule_wireless_disable_interfaces
@@ -11,7 +11,7 @@
if command -v wicked >/dev/null 2>&1 && systemctl is-active wickedd >/dev/null 2>&1; then
if [ -n "$(find /sys/class/net/*/ -type d -name wireless)" ]; then
- interfaces=$(find /sys/class/net/*/wireless -type d -name wireless | xargs -0 dirname | xargs basename)
+ interfaces=$(find /sys/class/net/*/wireless -type d -name wireless -print0 | xargs -0 -n1 dirname | xargs -n1 basename)
for iface in $interfaces; do
wicked ifdown $iface
sed -i 's/STARTMODE=.*/STARTMODE=off/' /etc/sysconfig/network/ifcfg-$iface |
Signed-off-by: Alan Moore <alan.moore@canonical.com>
|
Hi @alanmcanonical, could you please update the PR title and description to follow the template, and explain the scenario being fixed and the test scenarios? It will help speed up the review a lot. Thanks! |
|
The target scenario is interface being present more than one. |
macko1
left a comment
There was a problem hiding this comment.
Also please update the heading to something like.
Fix wireless_disable_interface remediations.
Thanks.
Signed-off-by: Alan Moore <alan.moore@canonical.com>
Description:
Rationale: