commit acaf9c45a340f9bb49d6b21ba7ad60c21326ea73 Author: Mingming Cao Date: Mon Nov 7 14:39:02 2022 -0800 hcnmgr: Fix setting primary slave across reboots Using nmcli to set bonding of primary slave so that is set correctly across reboots. Signed-off-by: Mingming Cao [tyreld: Reworded commit log] Signed-off-by: Tyrel Datwyler diff --git a/scripts/hcnmgr b/scripts/hcnmgr index 6946ff9..b5a6bfb 100644 --- a/scripts/hcnmgr +++ b/scripts/hcnmgr @@ -375,7 +375,8 @@ do_config_vdevice_nm() { # if the device is primary, and link is up, force it as primary se if [[ $MODE == "primary" ]]; then hcnlog INFO "Change bonding primary slave to $DEVNAME" - echo "$DEVNAME" >"$BOND_PATH"/primary + nmcli con mod id "$BONDNAME" +bond.options "primary=$DEVNAME" + nmcli con up "$BONDNAME" fi hcnlog DEBUG "do_config_vdevice: exit"