Mostrando entradas con la etiqueta linux. Mostrar todas las entradas
Mostrando entradas con la etiqueta linux. Mostrar todas las entradas

miércoles, 1 de enero de 2014

Keeps dsl-provider connected on GNU/Linux

Hey everybody, here I made a Bash Script that restore the connection if it's broken, i hope it is useful, enjoy!


#!/bin/bash
if [ $(whoami) = 'root' ]
then
    rest=0
    salir=0
    while [ $salir = 0 ]
    do
        ip r | grep .
        if [ $? = 1 ]
        then
            # Verifying that eth0 is setted up
            ip link show dev eth0 | grep "state UP"
            if [ $? = 1 ]
            then
                echo "Check your modem and cables"
                salir=1;
            else
                echo "Connection down, attempting to reconnect..."
                #### Begin - PPPoE Connection Commands
                poff dsl-provider # Cleaning.
                pon dsl-provider
                #### End - PPPoE Connection Commands
                clear
                if [ $rest = 0 ]
                then
                    rest=1
                else
                    if [ $rest > 1 ]
                    then
                        echo "re-connection command issued ("$rest " times)"
                        echo "hoping for the best"
                    fi
                fi
                rest=$(expr $rest + 1)
                # wait for 10 seconds, to not saturate the cpu.
                sleep 10;
            fi
        else
            echo "Connection Established"
        fi
    done
else
    echo 'You are not root, try again being root user'
fi

if [ $salir = 1 ]
then
    exit 1
else
    exit 0
fi

To use it, just copy it and paste into a .sh new file.

You are able to modify it and share it!

As always, sorry my English!

Regards!

Another push to GNU/Linux - SteamOS

Without doubts, sooner or later, we will get involved in a new age, the age of Linux, and part of this movement will be generated by this O.S., because the amount of gamers that nowaday do not use linux, because they can not run their games, is huge.
Moreover, this new flavor of GNU/Linux wiil provide new enhaced drivers and betters algorithms dedicated to draw graphics in ours screens.

As the Steam Team says:
"In SteamOS, we have achieved significant performance increases in graphics processing, and we’re now targeting audio performance and reductions in input latency at the operating system level. Game developers are already taking advantage of these gains as they target SteamOS for their new releases."

and such system, will be colaborative:
"Steam is not a one-way content broadcast channel, it’s a collaborative many-to-many entertainment platform, in which each participant is a multiplier of the experience for everyone else. With SteamOS, “openness” means that the hardware industry can iterate in the living room at a much faster pace than they’ve been able to. Content creators can connect directly to their customers. Users can alter or replace any part of the software or hardware they want. Gamers are empowered to join in the creation of the games they love. SteamOS will continue to evolve, but will remain an environment designed to foster these kinds of innovation."

This means less monopoly and much better Indie games!

So I invite you to watch out to the Release date of SteamOS!

Clic here to learn more!
Sorry my poor English!