Skip to content

Commit

Permalink
Search for any line that include the IP not juse equals IP
Browse files Browse the repository at this point in the history
Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov authored and mnecas committed Sep 12, 2024
1 parent 201b6ae commit a0a0452
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ udev_from_ifcfg() {
fi

# Find the matching network script file
IFCFG=$(grep -l "IPADDR=$S_IP" "$NETWORK_SCRIPTS_DIR"/*)
IFCFG=$(grep -l "IPADDR=.*$S_IP.*$" "$NETWORK_SCRIPTS_DIR"/*)
if [ -z "$IFCFG" ]; then
log "Info: no ifcg config file name foud for $S_IP."
continue
Expand Down Expand Up @@ -148,7 +148,7 @@ udev_from_nm() {
fi

# Find the matching NetworkManager connection file
NM_FILE=$(grep -El "address[0-9]*=$S_IP" "$NETWORK_CONNECTIONS_DIR"/*)
NM_FILE=$(grep -El "address[0-9]*=.*$S_IP.*$" "$NETWORK_CONNECTIONS_DIR"/*)
if [ -z "$NM_FILE" ]; then
log "Info: no nm config file name foud for $S_IP."
continue
Expand Down

0 comments on commit a0a0452

Please sign in to comment.