#!/bin/sh # Source function library. . /etc/rc.d/init.d/functions #LOC_IP=0.0.0.0 #NETMASK=255.255.255.255 #GW=0.0.0.0 # set to correct product (USB or PCI) UNICORN="unicorn_pci_eth" #UNICORN="unicorn_usb_eth" # ANSI=1,G.lite=2,MULTI=3,G.dmt=4, MODULATION=4 # default VPI, VCI and encapsulation VPI=8 VCI=36 # standard setting for IP over ATM PROTOCOL=ipoatm ENCAPS=null # Interface Name interface="dsl0" echo -n "$1 $UNICORN $PROTOCOL $VPI.$VCI $ENCAPS" stop () { /sbin/ifconfig $interface down >/dev/null 2>&1 /sbin/modprobe -r $UNICORN >/dev/null 2>&1 return $? } start() { /sbin/modprobe $UNICORN PROTOCOL=$PROTOCOL ActivationMode=$MODULATION VPI=$VPI VCI=$VCI [ ! "$?" = 0 ] && return $? /sbin/ifconfig $interface up #/sbin/ifconfig dsl $LOC_IP netmask $NETMASK #/sbin/route add gw $GW return 0 } case "$1" in stop) stop ;; start) start ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac RETVAL=$? if [ $RETVAL = 0 ]; then echo_success else echo_failure fi echo exit $RETVAL
#!/bin/sh # script demarrage modem Bewan PCI ST rep="/logical-disk/data/SOURCES/unicorn" <---- à personnaliser 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 # Source networking configuration. . /etc/sysconfig/network start() { $rep/scripts/unicorn-ipoatm start; dhcpcd dsl0; cat /etc/resolv.conf.ok > /etc/resolv.conf <----- pas obligatoire /etc/init.d/named restart && /etc/init.d/shorewall restart && echo "OK !"; <---- redémarrage résolution et firewall echo "Démarrage Modem"; #killall tail; } stop() { # Stop daemons. killall dhcpcd; <----- Tue le DHCP rm -f /etc/dhcpc/*.pid; <----- Efface le PID associé $rep/scripts/unicorn-ipoatm stop; } case "$1" in start) start ;; stop) stop ;; restart) stop start RETVAL=$? ;; *) gprintf "Usage: /etc/init.d/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
phpMyVisites : logiciel gratuit de mesure d'audience et de statistiques de sites Internet (licence libre GPL, logiciel en php/MySQL)