[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: missing gw in route -n



I played with script on an Intel box running Debian and made a few changes:


#!/bin/bash
#
# $Id: check-ifaces.sh,v 0.3 2018/07/17 19:17:46 kc4zvw Exp kc4zvw $

# Somewhat tested, now there may be more bugs, your mileage might vary

REPORT_FILE=$0.out

function check_ip()
{
        echo "Run 'sudo apt-get install iproute2' for needed tools."
        exit 1
}

function setup_report_file()
{
        rm $REPORT_FILE
        touch $REPORT_FILE
}

function out()
{
        echo -e "\n#### Running: ${@} ####\n" | tee -a $REPORT_FILE
        ## $@ | tee -a $REPORT_FILE
        $@ >> $REPORT_FILE
}

## ----- main begins here -----

echo
echo "Started to collect data ..."
echo

setup_report_file
which ip || check_ip

out ip a
out ip l
out ip route
out ps ax
out cat /etc/resolv.conf

for f in $(find /etc/network -type f)
do
        [[ -f "$f" ]] && [[ "$(file "$f")" =~ text ]] && out cat "$f";
done

echo
echo "All data saved to $REPORT_FILE."

# End of File



 -=-=-=-=-


regards,

David

-----Original Message-----

>From: Christopher Barry <cbarry@symbiaudix.com>
>Sent: Jul 12, 2018 11:36 PM
>To: debian-arm@lists.debian.org
>Subject: Re: missing gw in route -n

>On Thu, 12 Jul 2018 21:52:13 -0400
>Gene Heskett <gheskett@shentel.net> wrote:

>>On Thursday 12 July 2018 18:04:54 Christian Knoke wrote:

>>> Du schriebst am 12. Jul um 16:57 Uhr:  
>>> > On Thursday 12 July 2018 14:16:43 Christian Knoke wrote:  
>>> > > Gene Heskett schrieb am 12. Jul um 10:07 Uhr:
>>> > >
>>> > > hth  
>>> >
>>> > Not yet.  If I can't fix this tomorrow, I'll write another sd card
>...snip
>
>follow the below 5 steps for help solving this.
>
>1.) highlight/copy from the NEXT line down to the line '# EOF'
>#!/bin/bash
># untested, there may be bugs, ymmv
>
>which ip || { 
>    echo "run 'sudo apt-get install iproute2' for needed tools"
>    exit 1
>}
>
>> $0.out
>
>function out() {
>    echo -e "\n#### running: ${@} ####\n"; $@ | tee -a $0.out
>}
>
>out ip a
>out ip l
>out ip r
>out ps ax
>out cat /etc/resolv.conf
>
>for f in $(find /etc/network -type f); do
>    [[ -f ${f} && "$(file "${f}")" =~ text ]] && {
>	out cat "${f}"
>    }
>done
>
>echo "data saved to $0.out"
>
># EOF
>
>2.) paste/save that into a new text file named ck-ifaces
>
>3.) then in terminal as root, run:
>
>you@box:~# sh /path/to/ck-ifaces
>
>4.) post 'contents' of ck-ifaces.out to pastebin.com (not here on list)
>
>5.) post 'link' to your pastbin data here
>
>
>-- 
>Regards,
>Christopher Barry
>

-- 
David - Chuluota, FL

-- 


Reply to: