Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SCRIPT] Profiles pour vos interfaces LAN et WIRELESS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Thu Jan 12, 2006 12:41 am    Post subject: [SCRIPT] Profiles pour vos interfaces LAN et WIRELESS Reply with quote

Bonsoir, j'ai décidé de faire un petit script assez simple permettant la sauvegarde de toutes les manipulations à effectuer pour vous connecter à votre réseau cablé (LAN) ou sans-fils (WLAN). J'ai avant tout pensé aux utilisateurs de portable (heu... et a moi aussi, au début :roll:) qui doivent en avoir des fois un peu marre de configurer tout le temps leur interface réseau de manière différente, selon l'endroit ou ils se trouvent. Ce script est la pour vous simplifier la vie.

Donc, j'ai supposé que les utilisateurs de portable n'avaient que 2 interfaces (1 pour le WAN et une pour le WLAN)... Oui, encore désolé si vous avez plus que ça, mais avec un peu de rajout, il devrait pouvoir en gérer plus ;). Libre à vous de le modifier selon vos désirs.

Je voulais que ce script puisse me connecter en lui passant juste le nom du profile (ou le profile par défaut, si on ne spécifie pas le nom). C'est ainsi que pour chaque profile, vous devez specifier au début (variable CURRENT) de quelle interface vous parlez (vous parlez d'un réseau sans-fils (WLAN) ou d'un réseau cablé (LAN) ???).
Grace à cet variable, le script est donc capable de configurer vos options pour la carte LAN ou WLAN. Vous DEVEZ obligatoirement configurer les deux variables LAN et WLAN, qui represente le nom de vos interface (ex: LAN="eth0" et WLAN="eth1"). Sans cela, la carte ne pourra etre configurée, vu que le script ne sais pas de quelle carte on parle...
La dernière chose à configurer avant d'ajouter les profiles est la variable DEFAULT, qui représente le nom du profile utilisé par défaut. Par defaut, cette variable contient "help", ce qui aura pour effet d'afficher l'aide si vous ne l'avez pas changée (en utilisant le script sans paramètres).


La dernière chose à faire, c'est d'y ajouter tout vos profiles. Exemple et explications se trouve dans le script (en commentaire). Voici la logique à suivre:
- un profile n'est qu'une fonction contenant les commandes ifconfig et iwconfig et plein d'autre si vous en avez besoin...
- le nom de cette fonction sera alors le nom de profile

- chaque profile DOIT OBLIGATOIREMENT COMMENCER PAR CECI:
- CURRENT= pour spécifier le type de réseau (et donc, la carte à utilié ;))
- start appeller cette fonction (pour activer la prise en charge de l'argument 'fix' dans le profile, et aussi faire un ifconfig INT up avant la configuration.)
- après, vous pouvez soit utiliser la fonction use_dhcp, ou specifier à la main les configurations de vos interface.
- puis vous pouvez encore ajouter tout ce qu'il vous plaira de démarrer lors de la connexion avec ce profile. Ex, montage de NFS, etc... :o

Je tiens à préciser qu'il y a juste un petit détail à régler dans la prochaine version. C'est juste le fait que, à chaque utilisation de la fonction use_dhcp, celle ci va faire un pkill dhcpcd (qui est une bonne méthode pour tuer le dhcpcd quand il est déjà activé. Il faut le faire sinon la commande dhcpcd ne passera pas, vu qu'elle est déjà présente). Le problème, c'est que si vous utiliser le dhcpcd pour vos 2 interfaces, l'activation du deuxième profile va tuer le dhcpcd du premier profile. Il faudrait en fait, à la place de faire un pkill dhcpcd, faire un truc (que je sais pas comment faire!!!) qui tuerais le dhcpcd DE l'INTERFACE à reconfigurer, et non TOUS...
Si vous savez comment faire, dites le moi,je mettrai à jour directement ;)

Voilà, si vous avez des problèmes ou des suggestions, faites m'en part :)

Note: à executer en root, faites un chmod +x fichier pour le rendre exécutable, démarrage via './net-loop' ou 'sh net-loop'
Note2: j'espère ne pas vous choquer avec mon anglais :D
Note3: pour l'aide, 'net-loop help', ou alors, regarder dans le script ;)
Note4: un petit "ln -s net-loop /usr/sbin/net-loop" et vous pourez l'executer de n'importe ou :)

EDIT: dernière modification du script: 15 janvier, 19h
Code:

loop-nb ~ # cat net-loop
#!/bin/bash
# By loopx (loop_x@hotmail.com)...
# If you have bug report or any suggestions, send me a mail :)
# Last modification: 01/15/2006
#####################################
###################################
################################
# Introduction:
# I have made this little script to save ALL network configuration
# of my notebook. Yes, it will not be usefull for desktop computer,
# because they have one configuration, because a tower can't move like
# a notebook.
# So, you can easily use this script to store your different configurations
# in ONE and unique file, which is a script.
#
# A notebook has generally one wired network interface, and one wireless network interface.
# So I use 2 variable: WLAN and LAN, to store the name of the interface (you can found it by this 'ifconfig -a', or 'iwconfig').
# It's very important to set WLAN and LAN. If not, the script will do nothing good :(.
# The 3rd variable are CURRENT. You MUST set it AT THE FIRST LINE OF EACH PROFILE. It would associate a type of connection (LAN, WLAN)
# to the profile. Like this, this script is able to configure your NIC correctly.
# After setting the CURRENT variable, you MUST USE the function 'start' to start initialisation and fixing old route problem if needed.
# Note, you should use (in your profile) $WLAN or $LAN
# instead of eth1 or eth0. It's a modularity question... And if you buy a new wireless card, in addition of the old, and you want to
# use it for ALL your profile, you just need to change the value of the variable WLAN (WLAN="eth3"). So, enjoy ;)
# NOTE: do not forgot to set the DEFAULT value, with the profile name of your profile than you want to set as default. For use the default
#   profile, you just need to type 'net-loop' with no argument. By default, DEFAULT will show you the help...
#########################################################################################################################################
########################################################################################################################################
# Example of a very simple profile, to connect to the network 10.59.13.75/24 with 10.59.13.254 as default route (no wireless, no dhcp):
#-------
# my_profile_name() {
#    CURRENT="LAN"
#    start
#    echo "I start my profile here"
#    ifconfig $LAN 10.59.13.75 netmask 255.255.255.0 broadcast 10.59.13.255       #no need to add the 'up' argument, 'start' function will do it before
#    route add default gw 10.59.13.254
#    echo "#my_profile_name" > $DNS          #Add a trace to the DNS configuration file, AND replace the current content of this file ('>')
#    echo "domain my_domain.org" >> $DNS     #Add the domain name AT THE END of the file ('>>') (if not needed, you can remove this line)
#    echo "nameserver 10.59.13.75" >> $DNS   #Add primary domain name, you can add more by copy/past this line just after...this line
# }
#
# Second example: here is an other profile, but using wireless AND dhcp
#---------------
# my_profile_name() {
#    CURRENT="WLAN"
#    start
#    echo "Here is my second profile"
#    iwconfig $WLAN essid "home" key open KEY rate auto AP mac_AP     #YOU NEED THIS, before using DHCP with wireless !!! If not, DHCP will fail.
#    use_dhcp
# }
##################################################################################################################################################
#################################################################################################################################################


############
# Configuration
#--------------
# 0. Set up the 4 variables: LAN, WLAN, DEFAULT, DNS with correct value ...
#
# 1. You MUST ADD these two command AT THE BEGINING OF EACH PROFILE!!!:
#       CURRENT="X"     (X= LAN or WLAN)
#       start           to start the initialisation of your NIC
# 2. You can add this line to use the dpcpcd command for use the DHCP:
#       use_dhcp
# 3. If you won't use DHCP, you can now add your command line and argument to set up
#    your interface. You can use what you want:
#       iwconfig $WLAN ....
#       ifconfig $LAN ....
# 4. Now it's stuff time. You can add what you need in addition of your configuration of interface.
#       mount serveur:/mnt/data /mnt/server
#       xmms ?
#       /usr/games/bin/q3demo ...
#
#----------------------------------
# LAN = interface for wired network
# WLAN = interface for wireless network
# DEFAULT = the default profile to use when no parameter or when fixing bug
# DNS = the path to the resolv.conf configuration file (DNS=/etc/resolv.conf by default)
# CURRENT =  LAN or WLAN   Specifie what interface to use (for DHCP use). This variable MUST BE SET IN THE BEGINING OF YOUR PROFILE
LAN="eth0"
WLAN="eth1"
DEFAULT="home"
DNS=/etc/resolv.conf
############



############
# ALL YOUR PROFILES,
# ARE JUST A LIST OF COMMAND TO EXECUTE IN A SHELL.
# YOU CAN ADD WHAT YOU WANT HERE, LIKE NFS MOUNTING, ETC...
############

############WIRELESS##########
home() {
        CURRENT="WLAN"
        start

        iwconfig $WLAN essid "loopx" channel 5 key open 32132132132132132132132132 rate auto mode Managed AP 00:12:17:6f:b4:29
        use_dhcp

        echo "domain loopx.dyndns.org" > $DNS
        echo "nameserver 192.169.0.254" >> $DNS

        echo
        echo "    >>> Mounting NFS system"
        /etc/init.d/portmap start
        mount 192.169.0.254:/mnt/data  /mnt/serveur
}

##############WIRED###########
internat() {
        CURRENT="LAN"
        start

        echo
        echo "    >>> Personal configuration for domain INTERNAT..."
        ifconfig $LAN 10.59.13.75 netmask 255.255.255.0 broadcast 10.59.13.255

        echo "#internat-personal" > $DNS
        echo "domain internat.prov-liege.be" >> $DNS
        echo "nameserver 10.59.13.254" >> $DNS
        echo "nameserver 192.168.1.254" >> $DNS

        echo "        Adding 2 route to INPRES..."
        route add -net 10.59.5.0 netmask 255.255.255.0 gw 10.59.13.254
        route add -net 10.59.4.0 netmask 255.255.255.0 gw 10.59.13.254
        echo "        Adding host route to loopx.dyndns.org, can take a while"
        route add -host loopx.dyndns.org gw 10.59.13.254

        echo "    >>> Starting VPN..."
        /etc/init.d/openvpn start

        echo "    >>> Starting proxy socks... (!!! WARNING: CONSOLE IN USE !!!)"
        ssh -D 9999 -g loopx@localhost
}


############################################################################################################
#####################################################################
# HERE ARE SOME BASIC FUNCTION USING TO SET YOUR NETWORK INTERFACE #
###################################################################
#################################################################

# ON/OFF wireless radio frenquency
wan_on() {
        echo "    >>> !!! Activating radio for WAN interface on" $WLAN "!!!"
        echo 1 > /proc/driver/acerhk/wirelessled
}
wan_off() {
        echo 0 > /proc/driver/acerhk/wirelessled
        echo "    >>> WLAN radio frenquency is now OFF !!!"
}

# to show the current configuration of your interface
# Now, you can use 'net-loop status vpn' for the status
# of your vpn connection in example
status() {
        if [ -z $PARAM2 ]; then
                echo ">>> Status of your network interfaces :"

                echo "    >>> ===LAN interface==="
                ifconfig $LAN

                echo "    >>> ===WLAN interface==="
                ifconfig $WLAN
                iwconfig $WLAN

        #Here is my add of vpn status check. You can remove it if
        #not necessary. If you want to add another, just add the same first line (elif [ ...)
        #at the end of the first added status (vpn), and BEFORE the 'else'.
        elif [ $PARAM2 = "vpn" ]; then
                echo ">>> Status of you VPN network :"
                echo
                echo "    Entrez le nom ou l'ip de votre serveur: "
                read SERVEUR
                #the command run with ssh, show the status of my server OpenVPN
                echo
                echo "    >>> OpenVPN status for" $SERVEUR
                ssh root@$SERVEUR cat /etc/openvpn/serveur/openvpn-status.log
        else
                echo "!!! Error after 'status'. Nothing to do..."
        fi
}

# this is used by my, for fix an ipw2200 bug (slow connection)
fix() {
        #to fix the specified bug
        if [ -z $PARAM2 ]; then
                echo "    >>> Fixing ipw2200 bug..."
                rmmod ipw2200
                echo "        Waiting 5 seconds"
                sleep 3
                echo "        Re-loading ipw2200 module..."
                modprobe ipw2200
                echo "        Finished. You must now activate a profile to get connectivity!"

        #to remove old route of the profile to activate
        else
                $PARAM2
        fi
}

# check the CURRENT interface, and bring up DHCPCD to automatically set your NIC
use_dhcp() {
        if [ -z $CURRENT ]; then
                echo "    ??? Don't know what to do [*_*]"
        else
                echo
                echo "    >>> Using DHCP for" $CURRENT

                if [ $CURRENT = "LAN" ]; then
                        if [ -e "/var/run/dhcpcd-"$LAN".pid" ]; then
                                echo "        >>> Stopping old DHCPCD"
                                kill $(cat /var/run/dhcpcd-$LAN.pid)
                                sleep 1
                        fi
                        echo "        >>> Starting DHCPCD"
                        dhcpcd $LAN
                elif [ $CURRENT = "WLAN" ]; then
                        if [ -e "/var/run/dhcpcd-"$WLAN".pid" ]; then
                                echo "        >>> Stopping old DHCPCD"
                                kill $(cat /var/run/dhcpcd-$WLAN.pid)
                                sleep 1
                        fi
                        echo "        >>> Starting DHCPCD"
                        dhcpcd $WLAN
                else
                        echo "    !!! Error above, skipping..."
                fi
        fi
}

#Check the interface, and down it for remove old route. Used when changing profile, if you have manipulated the routing table before switch to another one.
fix_route() {
        #check for second parameter "fix"
        if [ -z $PARAM2 ]; then
                echo "    >>> First connection. Use 'fix' for remove old route problems."
        elif [ $PARAM1 = "fix" ]; then
                echo "    >>> Fixing old routes"

                if [ -z $CURRENT ]; then
                        echo "    ??? Must I do something [*_*] ?"
                elif [ $CURRENT = "LAN" ]; then
                        ifconfig $LAN down
                        sleep 1
                elif [ $CURRENT = "WLAN" ]; then
                        ifconfig $WLAN down
                        sleep 1
                else
                        echo "   !!! Error above, skipping..."
                fi
        fi
}

#check the interface and prepare it for its set up. Call fix_route to check if user want to fix route.
start() {
        if [ -z $CURRENT ]; then
                echo "    ??? You must specifie the CURRENT interface in your profile, by adding CURRENT="
        elif [ $CURRENT = "LAN" ]; then
                fix_route
                ifconfig $LAN up
                echo "    >>> LAN is now UP..."
        elif [ $CURRENT = "WLAN" ]; then
                fix_route
                ifconfig $WLAN up
                echo "    >>> WLAN is now UP..."
                echo
                wan_on
        else
                echo "    Wrong value for CURRENT in your profile! Skipping..."
        fi
}

#check the interface to shut down, and do it if needed
stop() {
        if [ -z $PARAM2 ]; then
                echo "    ??? You must specifie the interface to shut down: lan or wlan !"
        elif [ $PARAM2 = "lan" ]; then
                ifconfig $LAN down
                echo "    >>> LAN interface is now DOWN !!!"
        elif [ $PARAM2 = "wlan" ]; then
                wan_off
                ifconfig $WLAN down
                echo "    >>> WLAN interface is now DOWN !!!"
        else
                echo "    !!! Wrong interface to shut down! Skipping..."
        fi
}

#Help part of the script
help() {
        echo "       __________________________________"
        echo "      /   /   ___ ___ ___    \  /       /|"
        echo "     /   /   /  //  //  /     \/       / |"
        echo "    /   /   /  //  //__/      /\      / /|"
        echo "   /   /__ /__//__//    ___  /  \    / / |"
        echo "  +---------------------------------+ / /"
        echo "  |  /  /  /  /  /  /  /  /  /  /  /|/ /"
        echo "  |  Net-LooP {} {} {} Version 1.1  | /"
        echo "  |/  /  /  /  /  /^ /  /  /  /  /  |/"
        echo "  +------------/_[-_-]_\------------+"
        echo
        echo "  COMMAND LINE:"
        echo "  _-_-_-_-_-_-_"
        echo "    net-loop [ fix | status | stop | on | off | help ] [ PROFILE_NAME | STATUS_NAME | wan | lan ]"
        echo
        echo "  PROFILE:"
        echo "  _-_-_-_-"
        echo "    To use a profile:"
        echo "        net-loop [fix] PROFILE_NAME"
        echo
        echo "        The optional option 'fix' is used to remove old routes. Old routes is the remaining route, for exemple:"
        echo "           A= ifconfig $LAN 10.59.13.75 netmask 255.255.255.0 broadcast 10.59.13.255"
        echo "              route add default gw 10.59.13.254"
        echo "           B= ifconfig $LAN 10.59.13.75 netmask 255.255.255.0 broadcast 10.59.13.255"
        echo "              route add default gw 10.59.13.253"
        echo
        echo "        You have activate the profile A. And now, you want to change to profile B. Just the default route are"
        echo "        different between A and B. If you use 'net-loop PROFILE_NAME' without the 'fix' argument, you will have"
        echo "        2 default route !!! And now, the default route can't work correctly."
        echo "        So, if you use 'net-loop fix PROFILE_NAME', the default route of the preview profile"
        echo "        will be removed and no problem will occur."
        echo
        echo "  UTILITIES:"
        echo "  _-_-_-_-_-"
        echo "    To fix specified 'bug' that you know what to do for getting work again."
        echo "        net-loop fix"
        echo
        echo "    To get the status of your interfaces (no argument) or for other things (STATUS_NAME), you can add some 'if' in the"
        echo "    status function, like I have done for my VPN, used like this:"
        echo "        net-loop status [ vpn ]"
        echo
        echo "    To stop an interface. Note: stopping a WLAN interface result by switching off radio frequency"
        echo "        net-loop stop [ lan | wlan ]"
        echo
        echo "    To get this help, type this:"
        echo "        net-loop help"
        echo
        echo "  WIRELESS (for notebook users)"
        echo "  _-_-_-_-_-_-_-_-_-_-_-_-_-_-_"
        echo "    You can activate or desactivate the wireless radio frequency by using this:"
        echo "        net-loop [ on | off ]"
        echo
        echo "    Note: this will not shut down the interface (by ifconfig). It will only use the hardware switch"
        echo "    to stop emetting wireless. So, you can use your profile (using WLAN interface) and stop emetting"
        echo "    to preserve your battery.... and when you want, you re-active it, without re-activating a profile!"
        echo
        echo "  SETTING UP:"
        echo "  _-_-_-_-_-_"
        echo "    You MUST edit this script to set up important things:"
        echo "      - the name of your LAN and WLAN interfaces ('ifconfig -a' and 'iwconfig' can be used to look up the name"
        echo "        of the corresponding interface)"
        echo "      - define the DEFAULT profile"
        echo "      - set up the command to activate or desactivate the wireless hardware switch (wan_on and wan_off)"
        echo "      - add and configure your profiles. See the example present IN this script."
        echo
        echo "    No warranty, use this script at your own risk..."
        echo
        echo "  FEATURE:"
        echo "  _-_-_-_-_"
        echo "    - profile storage for the configuration of your interfaces"
        echo "    - DHCPCD is automaticaly stopped if needed"
        echo "    - UP your interface before set it (don't use 'up' with 'ifconfig' when adding new profile)"
        echo "    - Activate one or more profile, and stop it. Radio switch will be desactivated if needed (for WAN)"
        echo "    - When changing profile, can remove old route configuration (use of 'fix')"
        echo "    - Function 'status' can be modified for add new status check (for vpn, or anything)"
        echo "    - You can set file /etc/resolv.conf in your profile, by using $DNS variable"
}


##################################################################################################################
########
# MAIN #
#########
#######
PARAM1=$1
PARAM2=$2       #received argument can't be used in a function, so i use another variable
PROFILE=$(typeset -F | grep -w $1 | sed -n 's:^declare -f ::p')

#start default profile
if [ -z $1 ]; then
        echo ">>> Using default profile:" $DEFAULT ":"
        $DEFAULT
#show status
elif [ $1 = "status" ]; then
        status
#fix problems
elif [ $1 = "fix" ]; then
        echo ">>> Fixing some problems :"
        fix
#stop interface
elif [ $1 = "stop" ]; then
        echo ">>> Stopping an interface :"
        stop
#show help
elif [ $1 = "help" ]; then
        echo ">>> I show you the help :"
        help
#active the wireless switch
elif [ $1 = "on" ]; then
        echo ">>> I will only activate your WLAN with the hardware switch..."
        wan_on
#desactive the wireless switch
elif [ $1 = "off" ]; then
        echo ">>> I will only desactivate your WLAN with the hardware switch"
        wan_off
#try to acitve a profile
elif [ -z "$PROFILE" ]; then
        echo "!!! Error: profile '"$1"' not found !"
else
        echo ">>> Activating profile" $PROFILE ":"
        $PROFILE
fi

echo
echo ">>> Done"


#END


_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org


Last edited by loopx on Sun Jan 15, 2006 7:01 pm; edited 9 times in total
Back to top
View user's profile Send private message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Thu Jan 12, 2006 11:33 am    Post subject: Reply with quote

Sympa ton script :p


Pui - je me permettre de le récuperer pour le migrer en Xdialog ??
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Thu Jan 12, 2006 1:39 pm    Post subject: Reply with quote

No probz ;)
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
adrienleroy
n00b
n00b


Joined: 02 Dec 2004
Posts: 74
Location: Lille,France

PostPosted: Thu Jan 12, 2006 5:41 pm    Post subject: Reply with quote

j'utilise depuis peu un programme fort utile netswitch il est encore en developpement mais est deja tres performant et tres aboutit

http://netswitch.tuxfamily.org/en/index.html
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Thu Jan 12, 2006 10:03 pm    Post subject: Reply with quote

adrienleroy wrote:
j'utilise depuis peu un programme fort utile netswitch il est encore en developpement mais est deja tres performant et tres aboutit

http://netswitch.tuxfamily.org/en/index.html


L'intéret est ici, de ne pas avoir de gui (enfin, c'est pas un intérret.. grace à ca, on peu le porter sur n'importe quelle machine Linux), en ensuite, il ne fait pas QUE configurer le réseau, il peu très bien faire plus, par exemple: activation de certain service, etc...

Donc, le but, est d'associé une liste de commande à un profile, commande permettant biensur de configurer le réseau, et en plus de faire ce que vous devriez faire normalement (par exemple, activation de distcc .... etc ... etc...).
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sat Jan 14, 2006 12:10 am    Post subject: Reply with quote

arf dsl d'intervenir pour ça, j'ai juste lu quelque ligne au départ et euh voila..:
Code:
So, you can easily use this script to store your different configurations
# in ONE and unique file, who is a script.


which is a script ? ;)
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Sat Jan 14, 2006 12:54 am    Post subject: Reply with quote

truc wrote:
arf dsl d'intervenir pour ça, j'ai juste lu quelque ligne au départ et euh voila..:
Code:
So, you can easily use this script to store your different configurations
# in ONE and unique file, who is a script.


which is a script ? ;)


oh, je corrige de suite :lol: :lol: :lol:
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Sat Jan 14, 2006 8:27 pm    Post subject: Reply with quote

- problème dhcpcd corrigé
- profile erroné => profile not found, et non command not found par bash ;)
- j'ai fais le ménage
- et on peu ajouter d'autre truc pour le status (net-loop status vpn par exemple)
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Sun Jan 15, 2006 6:55 pm    Post subject: Reply with quote

encore une bêtise en plus: la variable $DNS contient le chemin et le fichier resolv.conf.

Si le profile n'utilise pas le DHCP, alors, utiliser un echo "blabla" >/>> $DNS pour régler le dns automatiquement :lol: :lol: :lol:
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
bllgtse
n00b
n00b


Joined: 28 Mar 2005
Posts: 24

PostPosted: Sat Jan 21, 2006 12:36 pm    Post subject: Reply with quote

Salut Loopx,

Je suis le dev de Netswitch. Je tenais à corriger une petite info.
Netswitch n'a pas besoin de GUI pour fonctionner, il a un script (globalement dans le même esprit que le tien), une bibilothèque pour interagir avec elle, et au dessus de tout ça... bien loin ... une appli GTK+ (et bientot peut-être une appli KDE).

Si tu veux participer pour ajouter des fonctions, je suis open :)
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Sat Jan 21, 2006 4:44 pm    Post subject: Reply with quote

@bllgtse:

Salut, oki, c'est noté. Mais pour la participation, je préfère garder mon script et l'améliorer plus tard. C'est pas que je suis contre Netswitch, mais vu que je l'avais pas vu et que j'ai commencer un script perso, je préfère continuer le mien.

Bah, ce sera jamais qu'un tit script tout simple, et moi aussi j'y rajouterai peut etre bien une application graphique pour gérer tout ca.

Je ferais un script plus générique (avec utilisation de plusieurs carte réso, et pas 2 max) un peu plus tard, je suis en exam ;).

Si t'es intéressé par un truc dans mon script, n'hésite pas à l'utiliser ;).
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
gulivert
l33t
l33t


Joined: 17 Jun 2004
Posts: 863
Location: Switzerland

PostPosted: Sun Jan 22, 2006 10:45 am    Post subject: Reply with quote

bllgtse wrote:
Salut Loopx,

Je suis le dev de Netswitch. Je tenais à corriger une petite info.
Netswitch n'a pas besoin de GUI pour fonctionner, il a un script (globalement dans le même esprit que le tien), une bibilothèque pour interagir avec elle, et au dessus de tout ça... bien loin ... une appli GTK+ (et bientot peut-être une appli KDE).

Si tu veux participer pour ajouter des fonctions, je suis open :)


Joli beau travail, personelement j'utilise netswitch avec le GUI GTK et il me va très bien, ainsi qu'à ma copine qui n'est pas trop callée ligne de commande, du coup le coup du GUI est bien pensé.
Bonne continuation pour ton logiciel.
_________________
Macbook Pro Unibody 9.1 - Kernel 4.4.6 - Awesome 3.5
Back to top
View user's profile Send private message
maxux
n00b
n00b


Joined: 25 Jul 2010
Posts: 10

PostPosted: Sun Dec 18, 2011 10:01 pm    Post subject: Reply with quote

Oh, un étudiant de l'inpres ? :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum