Skip to content

Commit

Permalink
netconsole: remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lnykryn committed Aug 27, 2024
1 parent 67743ca commit 0f85a3d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions usr/libexec/netconsole
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#
#
# netconsole This loads the netconsole module with the configured parameters.
#
# chkconfig: - 50 50
Expand Down Expand Up @@ -50,7 +50,7 @@ print_address_info ()
local route via target

route=$(LANG=C ip -o route get to $host/32)

[ -z "$DEV" ] && DEV=$(echo $route | sed "s|.* dev \([^ ]*\).*|\1|")
echo "DEV=$DEV"
echo "LOCALADDR=$(echo $route | sed "s|.* src \([^ ]*\).*|\1|")"
Expand All @@ -63,9 +63,9 @@ print_address_info ()
if [ -z "$SYSLOGMACADDR" ]; then
arp=$(LANG=C /sbin/arping -f -c 1 -I $DEV $target 2>/dev/null | awk '/ reply from .*[.*]/ { print gensub(".* reply from .* \\[(.*)\\].*","\\1","G"); exit }')
[ -n "$arp" ] && echo "SYSLOGMACADDR=$arp"
fi
}
fi
}

start ()
{
[ -f /etc/sysconfig/netconsole ] || exit 6
Expand Down Expand Up @@ -101,7 +101,7 @@ start ()
exit 6
fi
eval $(print_address_info $SYSLOGADDR)

if [ -z "$SYSLOGMACADDR" ]; then
echo $"netconsole: can't resolve MAC address of $SYSLOGADDR" 1>&2
exit 1
Expand Down Expand Up @@ -140,7 +140,6 @@ status ()
fi
}


restart ()
{
stop
Expand All @@ -152,7 +151,6 @@ condrestart ()
[ -e /var/lock/subsys/netconsole ] && restart
}


case "$1" in
stop) stop ;;
status) status ;;
Expand Down

0 comments on commit 0f85a3d

Please sign in to comment.