Skip to content

Commit

Permalink
make list of netdevices blank separated (instead of newline)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Jan 19, 2012
1 parent f7085cb commit fbc6d8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/get-boot-info
Expand Up @@ -40,7 +40,7 @@ bootlog=$LOGDIR/boot.log
netdevice_info() {

# devices that are running
netdevices_up=$(ip link show up | grep "^[1-9$].*LOWER_UP" | cut -d : -f 2 | cut -d ' ' -f 2 | grep -v "^lo" | sort | uniq)
netdevices_up=$(ip link show up | grep "^[1-9$].*LOWER_UP" | cut -d : -f 2 | cut -d ' ' -f 2 | grep -v "^lo" | sort | uniq| tr '\n' ' ')
# netdevices is the list of ethernet devices which will be used for bootpc (maybe dhcp)
# if not defined, use boot messages to determine network devices
[ -n "$netdevices" ] || netdevices=$netdevices_up
Expand All @@ -49,7 +49,7 @@ netdevice_info() {
netdevices_all=$(dmesg| perl -ne 'print $&,"\n" if m/\beth[0-9]\b/')
tmp=$(ip link | grep "^[1-9]" | cut -d : -f 2 | cut -d ' ' -f 2 | grep "^eth")
netdevices_all="$netdevices_all $tmp"
netdevices_all=$(for dev in $netdevices_all; do echo $dev; done| sort | uniq)
netdevices_all=$(for dev in $netdevices_all; do echo $dev; done| sort | uniq| tr '\n' ' ')

cat > $bootlog <<-EOF
netdevices_all="$netdevices_all"
Expand Down

0 comments on commit fbc6d8a

Please sign in to comment.