github.com/k8snetworkplumbingwg/sriov-network-operator@v1.2.1-0.20240408194816-2d2e5a45d453/bindata/scripts/clean-k8s-services.sh (about)

     1  #!/bin/bash
     2  
     3  if [ "$CLUSTER_TYPE" == "openshift" ]; then
     4    echo "openshift cluster"
     5    exit
     6  fi
     7  
     8  chroot_path="/host"
     9  
    10  
    11  ovs_service=$chroot_path/usr/lib/systemd/system/ovs-vswitchd.service
    12  
    13  if [ -f $ovs_service ]; then
    14    if grep -q hw-offload $ovs_service; then
    15      sed -i.bak '/hw-offload/d' $ovs_service
    16      chroot $chroot_path /bin/bash -c systemctl daemon-reload >/dev/null 2>&1 || true
    17    fi
    18  fi