• [^] # whereami & laptopnet

    Posté par . En réponse au journal Les ordinateurs portables qui bougent. Évalué à 4.

    whereami n'est pas mal non plus pour la détection automatique des réseaux accessibles avec les catégories:
    + testmii
    + testpci
    + testdhcp
    + testarp
    + testping
    + testmodule

    - Plusieurs tests peuvent être spécifiés pour un même environnement réseau.
    - La configuration du mail est inclue.
    - Possibilités de montage auto de ressources partagées selon le réseau
    Et je dois en oublier...

    Sinon, voici un exemple de configuration de laptopnet :
    /etc/laptop-net/shcemes
    |=----- 8< ----- Couper ici / cut here ----- 8< -----=
    case "${SCHEME}" in
    offline)
    # Setting nothing means to leave the network interface disabled.
    ;;
    home)
    DHCP="no"
    ADDRESS="192.168.1.62"
    NETMASK="255.255.255.0"
    GATEWAY="192.168.1.1"
    NAMESERVERS="192.168.1.5 212.27.32.176"
    ;;
    boulot)
    DHCP="no"
    ADDRESS="192.168.2.11"
    NETMASK="255.255.255.0"
    GATEWAY="192.168.2.254"
    NAMESERVERS="62.4.16.70 62.4.17.69"
    ;;
    *)
    # Set to "yes" to use DHCP
    DHCP="no"

    # These bindings specify a static address and are ignored if DHCP is used:

    # IP address (required)
    ADDRESS="192.168.1.62"
    # Netmask (required)
    NETMASK="255.255.255.0"
    # Broadcast address (optional)
    BROADCAST=
    # Network address (optional)
    NETWORK=
    # Gateway address (optional)
    ###############################################################
    GATEWAY="192.168.1.5"
    ###############################################################

    # These bindings are used both for DHCP and static addresses:

    # Local domain name (optional)
    DOMAIN=""
    # Search list for host lookup (optional)
    SEARCH=""
    # Nameservers, separated by spaces (optional)
    ###############################################################
    NAMESERVERS="192.168.1.5 212.27.32.176"
    ###############################################################
    ;;
    esac
    |=----- 8< ----- Couper ici / cut here ----- 8< -----=

    /etc/laptop-net/ip-map
    |=----- 8< ----- Couper ici / cut here ----- 8< -----=
    # Here are two example entry lines:

    home 192.168.1.45 192.168.1.5 # 45 si il est allumé, sinon 5
    boulot 192.168.1.100 # C'est l'imprimante réseau
    |=----- 8< ----- Couper ici / cut here ----- 8< -----=