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

Re: [MiNT] Samba client



On Wed, Sep 1, 2010 at 8:56 PM, Peter Slegg <p.slegg@scubadivers.co.uk> wrote:
> Looking at the boot script /etc/rc  it does this:
>
> #
> # Start up the MiNT Network - only if really enabled.
> #
> if [ -f /etc/rc.d/rc.net -a -e /dev/socket ]; then
>        sh /etc/rc.d/rc.net
> fi
>
>
> #
> # execute local things
> #
> if [ -f /etc/rc.d/rc.local ]; then
>        sh /etc/rc.d/rc.local
> fi
>
> -----------
>
> rc.local starts dhclient
>
> the rc.net script looks like this below. I think I added some echo
> messages to make it a bit clearer when booting.
>
> I suspect either a defect in these scripts is missing out the route:
> /sbin/route add 192.168.0.0 rtk0
> or it is a dhclient problem.
>
>
> ------------------
> #
> # /etc/rc.net -- run from /etc/rc.
> #
>
> #
> # Setup network interfaces and routes
> #
> echo -n "configuring interfaces:"
> grep -v '^#' /etc/sysconfig/config.if ¦ \
> while read intrfc ipaddr network netmask broadaddr; do
>        if [ -f /etc/sysconfig/"$intrfc".hw ]; then
>                ifconfig $intrfc -f /etc/sysconfig/"$intrfc".hw
>        fi
>        # mtu of 1472 works higher values might not
>        ifconfig $intrfc addr $ipaddr netmask $netmask broadaddr $broadaddr mtu 1458 up > /dev/null 2>&1
>        if [ "X$intrfc" != Xlo0 ]; then
>                route add $network $intrfc
>        fi
>        echo -n " $intrfc"
> done
> echo " ."
>
> echo -n "adding defaultroute:"
> grep -v '^#' /etc/sysconfig/defaultroute ¦ \
> while read intrfc ipaddr; do
>        route add default $intrfc gw $ipaddr > /dev/null 2>&1
>        echo -n " $ipaddr"
>        break
> done
> echo " ."
>
> #
> # Start network daemons
> #
> grep -v '^#' /etc/sysconfig/net.services ¦ \
> while read service; do
>        path="/etc/rc.d/init.d/$service"
>        if [ -f $path ]; then
>                $path start
>        fi
> done
>
>
> if [ -f /etc/rc.d/rc.nfs ]; then
>        sh /etc/rc.d/rc.nfs
> fi
>
FYI: this block of lines:
> echo -n "adding defaultroute:"
> grep -v '^#' /etc/sysconfig/defaultroute ¦ \
> while read intrfc ipaddr; do
>        route add default $intrfc gw $ipaddr > /dev/null 2>&1
>        echo -n " $ipaddr"
>        break
> done
> echo " ."

should produce in a log or at the console:
adding defaultroute: 192.168.0.1.???....

???.... maybe nothing

so if you are having problems with that gateway not being present,
check your logs (/var/logs/* ?)

If that line fails (to assign the default gateway) it will be because
the input info is invalid in some way

if you want to see exactly what is being set, add the following be the
"route" line:
>        echo route add default $intrfc gw $ipaddr

If you want to see exactly what is happening whe the gateway is being
set, chage the route line (not recommended):
>        route add default $intrfc gw $ipaddr

> /dev/null 2>&1 means:
output standard console text to nowhere (/dev/null) AND redirect error
output to console

so you should see something in the logs/console if there was an error


Paul