System Linux Network : SLN

Presque aucune configurations ! ;)


Pourquoi se lancer dans l'explication de la configuration d'une connexion ?
Parce que c'est la seule chose néssécaire et suffisante poue être connecté à l'Internet !

Prérequis :
  1. Les sources de votre noyaux : kernel-source
  2. Pilote ATM : liblinux-atm1-2.4.0-2mdk.rpm
  3. glibc-devel ou glibc-static-devel
  4. gcc, gcc-c++
  5. pciutils
  6. le module CDCEther

Installation :
Il brancher sa freebox sur l'usb
faire un modprobe CDCEther
faire un dhcpcd ethX

Il faut créer un script de connexion appelé "modem" qu'il soit éxécutable par root et placé dans /etc/init.d


#!/bin/bash
#

# If you're not root, you could not launching this script
if [ "`whoami`" != "root" ]; then
  echo "You must launch this script with root privileges. Enter root password."
  exec su -c "$0 $@"
  exit 1
fi

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0

start () {
modprobe CDCEther
/etc/init.d/network start
rm -f /etc/dhcpc/dhcpcd-eth1.pid
dhcpcd eth1
cp -f /etc/resolv.conf.ok /etc/resolv.conf
/etc/init.d/named start
/etc/init.d/shorewall start
}

stop () {
/etc/init.d/network stop
rm -f /etc/dhcpc/dhcpcd-eth1.pid
killall dhcpcd
rmmod CDCEther
	RETVAL=$?
}

case "$1" in
  start)
start
	;;
  stop)
stop
	;;
  restart)
stop
start
	;;
  *)
	gprintf "Usage: modem {start|stop|restart}\n"
	exit 1
esac

exit $RETVAL


/etc/resolv.conf.ok

search system-linux.net # parce que j'ai un DNS nameserver 82.67.59.175 # parce que j'ai un DNS nameserver 192.168.1.1 # parce que j'ai un DNS

Le script modem doit être activé au démarrage !
ln -s /etc/init.d/modem /etc/rc5.d/S30modem
Pour ceux qui ne veulent pas l'activer au démarrage, j'ai fait une appli qui lance ou arrète le modem !
Le tar.gz
Il faut bien avoir nommé le script "modem" et qu'il soit dans /etc/init.d et éxecutable !

Navigation Précédent     index15.php     Suite
Informations légales

Valid HTML 4.01! Valid CSS!