Skip to content

Commit

Permalink
Add alma9+rocky9 to nicutils.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrichert authored Jun 11, 2024
1 parent 19c81de commit 9fb4079
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xCAT/postscripts/nicutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ function add_extra_params_nmcli {
con_name=$2
rc=0

if [[ $OSVER != rhels9* ]]; then
if ! [[ $OSVER =~ (rhels9|alma9|rocky9) ]]; then
str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${con_name}"
str_conf_file_1="/etc/sysconfig/network-scripts/ifcfg-${con_name}-1"
if [ -f $str_conf_file_1 ]; then
Expand All @@ -1830,7 +1830,7 @@ function add_extra_params_nmcli {

if [ -n "$name" -a -n "$value" ]; then
# For RHEL 9, use nmcli directly, otherwise use ifcfg scheme.
if [[ "$OSVER" =~ rhels9 ]]; then
if [[ "$OSVER" =~ (rhels9|alma9|rocky9) ]]; then
nmcli con modify "$con_name" "$name" "$value"
rc+=$?
else
Expand All @@ -1849,7 +1849,7 @@ function add_extra_params_nmcli {
i=$((i+1))
done

if [[ $OSVER != rhels9* ]]; then
if [[ $OSVER != (rhels9|alma9|rocky9) ]]; then
$nmcli con reload $str_conf_file
fi
return $rc
Expand Down

0 comments on commit 9fb4079

Please sign in to comment.