View previous topic :: View next topic |
Author |
Message |
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Thu Jun 03, 2004 3:46 pm Post subject: [eagle-USB] Le script d'arrêt ne marche plus |
|
|
si je fais
Code: | #/etc/init.d/eagle-usb stop |
Le modem semble s'arrêter, mais il ne mets rien qomme confirmation, et il ne rend pas la main.
Code: | #!/sbin/runscript
# Charlie's modified version /etc/init.d/eagle-adsl
# should allow to have other ppp links up at the same time.
# should have got rid of the race condition which seemed to show when
# doing a restart
PPP=$(which pppd 2>/dev/null)
EAGLECTRL=$(which eaglectrl 2>/dev/null)
UMOUNT=$(which umount 2>/dev/null)
IFCONFIG=$(which ifconfig 2>/dev/null)
GREP=$(which grep 2>/dev/null)
LSMOD=$(which lsmod 2>/dev/null)
MAX_LOOP=160
EAGLESTAT=$(which eaglestat 2>/dev/null)
DHCPCD=$(which dhcpcd 2>/dev/null)
ROUTE=$(which route 2>/dev/null)
LOGGER=$(which logger 2>/dev/null)
LINKPIDFILE="/var/run/ppp-$LINKNAME.pid"
# pipe output to $LOGGERCMD to either get it to go to logger or to /dev/null
LOGGERCMD="cat"
case "$DEBUG" in
YES|yes)
[ -x ${LOGGER} ] && LOGGERCMD="${LOGGER} -t eagle-adsl"
;;
esac
check_pre_run () {
# Check module is loaded
(${LSMOD} | ${GREP} -q 'eagle.usb'); eend $? "Module eagle-usb is not loaded." || return 1
# Check for eaglectrl
[ -x ${EAGLECTRL} ] ; eend $? "Cannot find eaglectrl" || return 1
# And showstat
[ -x ${EAGLESTAT} ] ; eend $? "Cannot find eaglestat" || return 1
# And METHOD
[ "${METHOD:-set}" != set ] ; eend $? "Please define METHOD in /etc/conf.d/eagle-usb" || return 1
# And options
[ "${OPTIONS:-set}" != set ] ; eend $? "Please define OPTIONS in /etc/conf.d/eagle-usb" || return 1
[ -f ${OPTIONS} ] ; eend $? "Can't find OPTIONS file ${OPTIONS}" || return 1
# And DSP
[ "${DSP:-set}" != set ] ; eend $? "Please define DSP in /etc/conf.d/eagle-usb" || return 1
[ -a ${DSP} ] ; eend $? "Can't find DSP file ${DSP}" || return 1
# And synchro timeout
[ "${SYNCHRO_TIMEOUT:-set}" != set ] ; eend $? "Please define SYNCHRO_TIMEOUT in /etc/conf.d/eagle-usb" || return 1
# And linkname
[ "${LINKNAME:-set}" != set ] ; eend $? "Please define LINKNAME=\"eagle\" in /etc/conf.d/eagle-usb" || return 1
# Check usbdevfs is up and running ?should we eend if mount fails?
( ${MOUNT} | ${GREP} -q usbdevfs) || ${MOUNT} none /proc/bus/usb -t usbdevfs >/dev/null 2>&1
return 0
}
check_ppp () {
# Check for PPP
[ ! -z ${PPP} ] ; eend $? "failed to find ppp" || return 1
# Check for PEER file
[ "${PEER:-set}" != set ] ; eend $? "Please define \$PEER in /etc/conf.d/eagle-usb" || return 1
[ -f /etc/ppp/peers/${PEER} ] ; eend $? "Failed to find peer ${PEER} configuration" || return 1
# Check for IFCONFIG
[ -x ${IFCONFIG} ]; eend $? "Failed to find 'ifconfig'" || return 1
}
check_dhcpcd () {
# check for DHCPCD
[ ! -z ${DHCPCD} ] ; eend $? "failed to find dhcpcd" || return 1
# Check for IFCONFIG
[ -x ${IFCONFIG} ]; eend $? "Failed to find 'ifconfig'" || return 1
# Check for ROUTE
[ -x ${ROUTE} ]; eend $? "Failed to find 'route'" || return 1
}
launch_pppd () {
local RETURNED=1
local LOOP=0
echo "Starting Link $LINKNAME" | ${LOGGERCMD} > /dev/null
einfo "Launching PPP daemon ..."
# Get interface name
export EAGLE_IF=`${EAGLECTRL} -i`
# Set network interface
${IFCONFIG} ${EAGLE_IF} 192.168.60.30 netmask 255.255.255.0 up
# have to use a pidfile as well as exec, so we can use pppd for other things
# pppd will also give us a file containing both interface name and pid if we
# use the linkname option
start-stop-daemon --start --pidfile "$LINKPIDFILE" --exec ${PPP} call ${PEER} linkname $LINKNAME ${PPPDOPS} | "$LOGGERCMD" >/dev/null 2>&1
# Wait for connection to be established
while [ ${RETURNED} -ne 0 ] && [ ${LOOP} -le ${MAX_LOOP} ] ; do
let LOOP=LOOP+1
sleep 1
#I'm not sure whether to do this every iteration, but it can't hurt...
find_eagle_pppif
TMP=$?
echo "Waiting for link $LINKNAME (${PPP_INTERFACE}) to start: $LOOP of $MAX_LOOP" | ${LOGGERCMD} > /dev/null
if [ $TMP -eq 0 ] ; then
# echo "Waiting for link $LINKNAME (${PPP_INTERFACE}) to start"
# shouldn't confuse ppp1 and ppp10
${IFCONFIG} | grep -q "${PPP_INTERFACE}[[:space:]]"
RETURNED=$?
fi
done
if [ ${LOOP} -gt ${MAX_LOOP} ] && [ ${RETURNED} -ne 0 ] ; then
echo "Link $LINKNAME (${PPP_INTERFACE}) failed to start" | ${LOGGERCMD} > /dev/null
return 1
else
echo "Link $LINKNAME (${PPP_INTERFACE}) started" | ${LOGGERCMD} > /dev/null
return 0
fi
}
stop_ppp () {
local RETURNED=1
local LOOP=0
echo "Stopping Link $LINKNAME (${PPP_INTERFACE})" | ${LOGGERCMD} > /dev/null
find_eagle_pppif ;
if [ -f $LINKPIDFILE ]
then
start-stop-daemon --stop --pidfile $LINKPIDFILE pppd
# Wait for connection to go away
while [ ${RETURNED} -ne 0 ] && [ ${LOOP} -le ${MAX_LOOP} ] ; do
let LOOP=LOOP+3
sleep 1
echo "Waiting for link $LINKNAME (${PPP_INTERFACE}) to go away" | ${LOGGERCMD} > /dev/null
find_eagle_pppif ;
# could just use return value of find_eagle_pppif?
# but then would have to check whether the interface exists and delete the pidfile if it doesn't? but then would have a race condition?
${IFCONFIG} | grep -q "${PPP_INTERFACE}[[:space:]]"
RETURNED=$?
done
if [ ${LOOP} -gt ${MAX_LOOP} ] && [ ${RETURNED} -ne 0 ] ; then
echo "Link $LINKNAME (${PPP_INTERFACE}) failed to stop" | ${LOGGERCMD} > /dev/null
return 1
else
echo "Link $LINKNAME (${PPP_INTERFACE}) stopped" | ${LOGGERCMD} > /dev/null
return 0
fi
else
echo "File $LINKPIDFILE not found" | ${LOGGERCMD} > /dev/null
return 1
fi
}
launch_dhcpcd () {
# Get interface
export EAGLE_IF=`${EAGLECTRL} -i`
# Launch dhcpcd
start-stop-daemon --start --exec ${DHCPCD} -- ${DHCPCDOPTS} ${EAGLE_IF} >/dev/null 2>&1
${ROUTE} add default ${EAGLE_IF}
}
stop_dhcpd () {
# Get interface
export EAGLE_IF=`${EAGLECTRL} -i`
# Stop dhcpcd
start-stop-daemon --stop --quiet --pidfile /var/run/dhcpcd-${EAGLE_IF}.pid
}
launch_static () {
local RETURNED=1
local LOOP=0
einfo "Launching ADSL connexion..."
# Get interface
export EAGLE_IF=`${EAGLECTRL} -i`
# Set network interface
ebegin "Bringing interface WAN (usb modem) (${EAGLE_IF}) up: ${STATIC_IP}/${STATIC_NM}"
${IFCONFIG} ${EAGLE_IF} ${STATIC_IP} netmask ${STATIC_NM} up
eend $?
# Setting default gateway
ebegin " Setting default gateway:${STATIC_GW} via inteface ${EAGLE_IF}"
route add default gw ${STATIC_GW}
eend $?
}
stop_static () {
# Get interface
export EAGLE_IF=`${EAGLECTRL} -i`
# Bringing down interface
ebegin "Bringing down interface WAN (usb modem) ${EAGLE_IF}"
route del default
eend $?
}
modem_is_operational () {
# To be operational, firmware should be loaded. This mean, /proc/driver/eagle-usb
# directory is not empty
if ls /proc/driver/eagle-usb/* 1>/dev/null 2>&1
then
# Check "Modem is operational"
${EAGLESTAT} | grep -q "Modem is operational"
else
return 1
fi
}
load_and_sync () {
# Load firmware /DSP/ etc only if the modem is not yet operational
if modem_is_operational
then
einfo "Modem already operational"
else
einfo "Loading firmware, DSP and trying to sync ..."
${EAGLECTRL} -w -o ${OPTIONS} -d ${DSP} -s ${SYNCHRO_TIMEOUT} | \
${LOGGERCMD} 1>/dev/null 2>&1
fi
return $?
}
depend () {
need modules logger
}
find_eagle_pppif()
{
# identify which ppp interface is using the eagle.
# returns zero for success, 1 if interface not found.
PPP_INTERFACE=""
# LINKPIDFILE is defined at top of script- "/var/run/ppp-${LINKNAME}.pid"
# ppp kindly gives us both the PID and the interface name in the file
if [ -r "$LINKPIDFILE" ] ; then
LINKPID=`grep -o -E '^[0-9]+' "${LINKPIDFILE}"`
PPP_INTERFACE=` grep -o -E '^ppp[0-9]+' "${LINKPIDFILE}"`
fi
if [ -z "$PPP_INTERFACE" ] ; then
return 1 ;
else
return 0 ;
fi
}
start () {
ebegin "Starting eagle-adsl ..."
# Check everything needed is in place
check_pre_run ; eend $? "Pre-requesites check failed" || return 1
# Let's try to upload firmware/dsp and do synchro
load_and_sync ; eend $? "Failed to load or sync" || return 1
case "${METHOD}" in
"pppoa")
# launching ppp daemon
launch_pppd ; eend $? "Failed to start pppd daemon." || return 1
;;
"dhcpip")
# launching dhcpcd
launch_dhcpcd ; eend $? "Failed to start dhcpcd daemon." || return 1
;;
"staticip")
launch_static ; eend $? "Failed to start with static IP." || return 1
;;
esac
# Cool .. we're plugged ..
return 0
}
stop () {
export EAGLE_IF=`${EAGLECTRL} -i`
ebegin "Shutting down eagle-adsl..."
case "${METHOD}" in
"pppoa")
stop_ppp ; eend $? "Failed to stop 'pppd'"
;;
"dhcpip")
stop_dhcpd ; eend $? "Failed to stop 'dhcpcd'"
;;
"staticip")
stop_static ; eend $? "Failed to stop static IP." || return 1
;;
esac
${IFCONFIG} ${EAGLE_IF} down 1>/dev/null 2>&1
}
|
|
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Fri Jun 04, 2004 7:14 am Post subject: |
|
|
Tu es en quoi ? degroupe / non-degroupe ? si degroupe: DHCP ou IP en dur ? |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 11:58 am Post subject: |
|
|
non non juste non dégroupé.
ça marchait avant. j'ai voulu passer à udev à en moment puis revenue à devfs.
j'ai nptl aussi et prelink, je sais pas si ça peut venir de là |
|
Back to top |
|
|
PrEdAt0r Apprentice
Joined: 14 Nov 2003 Posts: 244
|
Posted: Fri Jun 04, 2004 12:07 pm Post subject: |
|
|
pour qu'il te rende la main , aprés je ne sais pas désolé ! _________________ Linux VS WINDOWS = 1 a 0 pour Linux
Gentoo Linux 2004.1 (dev-gentoo-sources 2.6.5) |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 12:11 pm Post subject: |
|
|
Code: | tpc root # /etc/init.d/eagle-usb stop &
[1] 7611
tpc root # * Shutting down eagle-adsl......
tpc root # /etc/init.d/eagle-usb status
* status: stopped
tpc root # /etc/init.d/eagle-usb start
* Starting eagle-adsl ...... [ ok ]
* Modem already operational [ ok ]
* Launching PPP daemon ... [ ok ]
[1]+ Done /etc/init.d/eagle-usb stop
tpc root # /etc/init.d/eagle-usb start
* WARNING: "eagle-usb" has already been started.
tpc root # /etc/init.d/eagle-usb stop
* Shutting down eagle-adsl......
* Failed to stop 'pppd' [ !! ]
tpc root #
tpc root # /etc/init.d/eagle-usb start
* Starting eagle-adsl ...... [ ok ]
* Modem already operational [ ok ]
* Launching PPP daemon ... [ ok ]
tpc root #
|
|
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Fri Jun 04, 2004 12:28 pm Post subject: |
|
|
Thom N2h wrote: | Code: |
tpc root # /etc/init.d/eagle-usb start
* Starting eagle-adsl ...... [ ok ]
* Modem already operational [ ok ]
* Launching PPP daemon ... [ ok ]
|
|
Ben deja PPP en degroupe ....
Tu as quoi dans ton /etc/conf.d/eagle-adsl ? |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 1:07 pm Post subject: |
|
|
Je suis en free 1024 non dégroupé
Code: | cat /etc/conf.d/eagle-usb
# Config file for the eagle-adsl ebuild
# Set the options path
OPTIONS="/etc/eagle-usb/eagle-usb.conf"
# Set DSP code path
DSP="/etc/eagle-usb/"
# Set default synchro timeout in seconds
SYNCHRO_TIMEOUT=120
# Set the peer filename
# This should be in /etc/ppp/peers/
PEER="dsl.peer"
#
# Method to connect : either pppoa, dhcpip, staticip
METHOD="pppoa"
#
# Static IP stuff : IP, Gateway, Netmask
STATIC_IP="ta.ra.ta.ta"
STATIC_GW="ta.ra.ta.254"
STATIC_NM="255.255.255.0"
LINKNAME=eagle
# setting DEBUG to YES or yes will cause some extra output to the log and to stderr
# recommended for diagnosing problems. You might also want to use PPPDOPTIONS below...
DEBUG=
# PPPDOPTS for any extra options for pppd. e.g.:
# PPPDOPTS='debug '
# DHCPCDOPTS for any extra options for dhcpcd. e.g.:
# DHCPCDOPTS="-R"
|
|
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Fri Jun 04, 2004 1:12 pm Post subject: |
|
|
Thom N2h wrote: |
Code: |
#
# Method to connect : either pppoa, dhcpip, staticip
METHOD="pppoa"
|
|
Ben voila .. T'as bien emerge avec un Code: | USE="dhcpip" emerge eagle-adsl |
??
Change en |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 1:22 pm Post subject: |
|
|
j'utilise pppoa
je suis pas en dégroupé
je suis en 1024 non dégroupé
J'ai pas de prob à la connection, c à la déconnection que ça marhce pas lorsqu'il faut que j'arrête que ça plante |
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Fri Jun 04, 2004 1:50 pm Post subject: |
|
|
Oops .. desole .. le rose a midi c'est pas bon
Une fois que le stop est "termine" tu peux faire un Code: | ps -ef | egrep [p]pp |
|
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 2:09 pm Post subject: |
|
|
remarque que je suis obligé de faire un ctrl+c pour terminer le stop et reprendre la main
Code: | # /etc/init.d/eagle-usb stop
* Shutting down eagle-adsl......
tpc eagle-usb # ps -ef | egrep [p]pp
tpc eagle-usb # ps -ef | egrep ppp
root 10438 9445 0 16:08 pts/2 00:00:00 egrep ppp
tpc eagle-usb # /etc/init.d/eagle-usb start
* Starting eagle-adsl ...... [ ok ]
* Modem already operational [ ok ]
* Launching PPP daemon ... [ ok ]
tpc eagle-usb # ps -ef | egrep ppp
root 10569 1 0 16:08 ? 00:00:00 /usr/sbin/pppd call dsl.peer linkname eagle
root 10571 10569 0 16:08 ? 00:00:00 /usr/sbin/pppoa -I eth0
root 10621 9445 0 16:08 pts/2 00:00:00 egrep ppp
|
|
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Fri Jun 04, 2004 3:38 pm Post subject: |
|
|
Humm .. Il doit merder (ou passer son temps) dans la fonction qui tue et attend la mort de pppd .. En sortant pppd est bien tue par contre ...
Quand tu refais le start il se reconnecte proprement ? |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 4:02 pm Post subject: |
|
|
Je te l'ai donné 2 post avant il stop, je fais ctrl+c
puis je relance, il me dit modem déjà opérationnel, lanvcement de pppd :'( |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Fri Jun 04, 2004 4:44 pm Post subject: |
|
|
Et si j'avais une merde ds mes scripts init, j'ai mon bootsplash qui ne se lance plus non plus ? |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Sat Jun 05, 2004 10:58 am Post subject: |
|
|
bon rien à voir avec les scripts init en général, mon bootsplash marche
Tu pourrais véifier si le script que j'ai copier collé ds le premier post est bien le tien, et n'est pas modifier stp |
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Mon Jun 07, 2004 7:12 am Post subject: |
|
|
Yop, ca a l'air d'etre le bon ..
Il doit rester tanque dans la boucle ...
Regarde dans ton fichier de log (syslog ou messages), si tu n'as pas de message du genre :
Waiting for link xxxxx (ppp0) to go away |
|
Back to top |
|
|
Thom N2h Apprentice
Joined: 03 Feb 2004 Posts: 161
|
Posted: Mon Jun 07, 2004 5:00 pm Post subject: |
|
|
Code: | Jun 7 18:32:03 [pppd] pppd 2.4.2 started by root, uid 0
Jun 7 18:32:03 [pppd] Using interface ppp0
Jun 7 18:32:03 [pppd] Connect: ppp0 <--> /dev/pts/3
Jun 7 18:32:06 [pppd] CHAP authentication succeeded
Jun 7 18:32:06 [pppd] kernel does not support PPP filtering
Jun 7 18:32:06 [pppd] local IP address 82.65.17.163
Jun 7 18:32:06 [pppd] remote IP address 192.168.254.254
Jun 7 18:32:06 [pppd] primary DNS address 213.228.0.212
Jun 7 18:32:06 [pppd] secondary DNS address 212.27.32.177
Jun 7 18:36:24 [init] Trying to re-exec init
Jun 7 18:58:12 [pppd] Terminating on signal 15.
- Last output repeated 6715 times -
Jun 7 18:58:12 [pppoa] read (AsyncReadFromPPP): Input/output error |
dc à 18h58 c qd j'ai voulu terminé |
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Tue Jun 08, 2004 6:40 am Post subject: |
|
|
Thom N2h wrote: | Code: |
Jun 7 18:58:12 [pppd] Terminating on signal 15.
- Last output repeated 6715 times -
Jun 7 18:58:12 [pppoa] read (AsyncReadFromPPP): Input/output error |
|
Hum zarb ... Apparamment pppd recoit bien le signal .. mais 6715 fois ca fait bcp quand meme .... on dirait qu'il ne veut pas s'arreter ... Je vais essayer de creuser ca .. |
|
Back to top |
|
|
herka n00b
Joined: 08 Aug 2003 Posts: 23
|
Posted: Thu Jul 08, 2004 10:02 pm Post subject: |
|
|
Salut a tous,
J'ai un probleme similaire a celui decrit par Thom N2h
Code: |
moon root # /etc/init.d/eagle-usb stop
* Stopping ddclient... [ ok ]
* Stopping ntpd... [ ok ]
* Stopping snort... [ ok ]
* Shutting down eagle-usb......
* Failed to stop 'pppd' [ !! ]
moon root # ps -ef | egrep [p]pp
moon root # ps -ef | egrep ppp
root 4813 2996 0 23:45 pts/0 00:00:00 egrep ppp
|
ce qui donne dans /var/log/message (stop puis start):
Code: |
Jul 8 23:26:45 moon pppd[1237]: Terminating on signal 15.
Jul 8 23:26:45 moon pppd[1237]: Connection terminated.
Jul 8 23:26:45 moon pppd[1237]: Connect time 326.9 minutes.
Jul 8 23:26:45 moon pppd[1237]: Sent 457445 bytes, received 5118949 bytes.
Jul 8 23:26:45 moon pppoa[1238]: read (AsyncReadFromPPP): Input/output error
Jul 8 23:26:45 moon pppd[1237]: Exit.
Jul 8 23:27:40 moon rc-scripts: Failed to stop 'pppd'
Jul 8 23:35:18 moon pppd[4086]: pppd 2.4.1 started by root, uid 0
Jul 8 23:35:21 moon pppd[4086]: Remote message: CHAP authentication success, unit 2991
Jul 8 23:35:21 moon pppd[4086]: local IP address 62.62.171.173
Jul 8 23:35:21 moon pppd[4086]: remote IP address 62.62.171.1
Jul 8 23:35:21 moon pppd[4086]: primary DNS address 80.118.192.100
Jul 8 23:35:21 moon pppd[4086]: secondary DNS address 80.118.196.36
|
Pour info :
noyau : 2.4.26-gentoo-r3
ebuild eagle-usb : 1.9.8-r2
FAI : 9T
Dependance : pppoa et pas de hotplug
qui a une idee ? ? ?
herka
PS : Au fait, y un probleme à l'install (mise à jour), un fichier eagle-usb.conf est installe dans le repertoire /etc/eagle-usb/dsp/ au lieur de /etc/eagle-usb/. Suis-je le seul a qui cela arrive ?
PS2 : Il y a une dependance de eagle-usb a dhcpcd meme avec l'option ppoa, est-ce normal ? necessaire ?
PS3 : Avis a ceux qui ont de problemes de communication, il a fallut que je modifie MTU et MRU de 1496 a 1492 (dans /etc/ppp/peers/dsl.peer), pour que tous les packets passent (cela etait genant notamment lors des emerge sync)
Last edited by herka on Sun Jul 11, 2004 6:54 pm; edited 1 time in total |
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Sat Jul 10, 2004 4:47 pm Post subject: |
|
|
herka wrote: |
PS : Au fait, y un probleme à l'install (mise à jour), un fichier eagle-usb.conf est installe dans le repertoire /etc/eagle-usb/dsp/ au lieur de /etc/eagle-usb/. Suis-je le seul a qui cela arrive ?
|
Corrige mais pas encore publie (dans la r3)
Quote: |
PS2 : Il y a une dependance de eagle-usb a dhcpcd meme avec l'option ppoa, est-ce normal ? necessaire ?
|
Non .. et elle ne devrait pas y etre .. je vais verifier ca ... |
|
Back to top |
|
|
herka n00b
Joined: 08 Aug 2003 Posts: 23
|
Posted: Sun Jul 11, 2004 9:14 am Post subject: |
|
|
Merci Sleeper pour ta reponse et ton boulot sur le driver eagle.
En ce qui concerne l'arret du driver et celui de pppd, a tu besoin d'aide ? de complements d'information ? As-tu une piste ?
Sur la dependance a dhcpcd, voici de quoi ettayer (ca s'ecrit comme cela ?) mes dires:
Quote: | moon root # qpkg -q dhcpcd
net-misc/dhcpcd-1.3.22_p4-r4 *
DEPENDED ON BY:
eagle-usb-1.9.8-r2
SYSTEM PROFILE
net-misc/dhcpcd-1.3.22_p4-r5
DEPENDED ON BY:
net-dialup/eagle-usb-1.9.8-r2
SYSTEM PROFILE
net-misc/dhcpcd-1.3.22_p4-r4
DEPENDED ON BY:
net-dialup/eagle-usb-1.9.8-r2
SYSTEM PROFILE |
Bref demande, et je verrais ce que je peux faire.
@+
herka
PS : j'aime bien les PSs
PS2 : une chtite question de fond, en fait plusieurs ? A quoi sert l'interface eth attribuee au modem en plus de celle en ppp ? Avez-vous des liens vers des sites expliquant son fonctionnement ? J'ai essaye les sources du driver, mais ce n'est pas ma partie et je n'ai rien trouver en googlelisant. Le but de ces questions est de savoir comment parametrer au mieux le pare feux qui protege la machine, doit-on tenir compte de cette interface eth attribuee au modem ? |
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Sun Jul 11, 2004 11:14 am Post subject: |
|
|
herka wrote: |
En ce qui concerne l'arret du driver et celui de pppd, a tu besoin d'aide ? de complements d'information ? As-tu une piste ?
|
Pas encore eu le temps de regarder .. Je suis en vacances et j'ai pas acces tout le temps a un PC
Quote: |
PS2 : une chtite question de fond, en fait plusieurs ? A quoi sert l'interface eth attribuee au modem en plus de celle en ppp ? Avez-vous des liens vers des sites expliquant son fonctionnement ? J'ai essaye les sources du driver, mais ce n'est pas ma partie et je n'ai rien trouver en googlelisant. Le but de ces questions est de savoir comment parametrer au mieux le pare feux qui protege la machine, doit-on tenir compte de cette interface eth attribuee au modem ? |
L'interface eth1 sert de moyen de dialogue avec le driver .. Dans le cas d'utilisation de pppd (PPPoA ou PPPoE), c'est a cette interface que ppp envoie els paquets recomposes.. Dans ce cas, c'est ppp0 qu'il faut utiliser dans les scripts firewall...
En IPoA, par contre c'est une interface a part entiere.. qu'il faut donc considerer comme telle |
|
Back to top |
|
|
herka n00b
Joined: 08 Aug 2003 Posts: 23
|
Posted: Thu Jul 15, 2004 2:57 pm Post subject: |
|
|
Salut a tous,
J'ai eu un peu de temps aujourd'hui pour appronfondir le sujet, je me suis attarde sur le script /etc/init.d/eagle-usb et je ne suis pas arrive tres loin.
Si j'ajoute la ligne
Quote: | echo "RETURNED=${RETURNED} et LOOP=${LOOP}" |
en fin de boucle des fonctions "launch_ppp" et "stop_ppp", je m'appercois, que pour "stop_ppp" j'ai tout de suite RETURNED=0 et LOOP < MAX_LOOP sans sortir de la boucle (while) alors que pour "launch_ppp" j'ai bien une bascule de RETURNED de 1 a 0.
Pour apronfondir cela, j'ai cherche partout la syntaxe des rc-scripts (#!/sbin/runscript) sans succes. Quelqu'un a-t-il un lien ?
Au fait, comment est detruite (down) l'interface eth (eth1 dans mon cas) creee au moment du /etc/init.d/eagle-usb start ? Je ne vois pas de d'equivalent a la ligne :
Quote: | {IFCONFIG} ${EAGLE_IF} 192.168.60.30 netmask 255.255.255.0 up | de la fonction launch_ppp dans la fonction stop_ppp.
Dans mon cas, on voit bien que l'interface ppp0 est tout de suite detruite par le stop et pas la eth1.
Au fait 2, pourquoi est-il inutile de tester le retour de find_eagle_pppif dans la fonction stop_ppp alors que cela est fait dans launch_ppp ?
Btw Sleeper, AMTHA ce serait bien si tu utilisais un nom de variable plus explicite que RETURNED. Peut-etre PPP_DOWN puisque cela vaut 1 si l'interface ppp_eagle est down ?
Les limites de mon incompetence sont maintenant atteintes, je ne pourrais pas allez plus loin votre aide
@+.
herka
PS: Sleeper, pourquoi dans la 1.9.8-r3 tu as mis le fichier eagle-usb.conf dans le repertoire /etc/eagle-usb/dsp/ ?
Last edited by herka on Thu Jul 15, 2004 10:16 pm; edited 1 time in total |
|
Back to top |
|
|
herka n00b
Joined: 08 Aug 2003 Posts: 23
|
Posted: Thu Jul 15, 2004 10:12 pm Post subject: [eagle-usb] probleme d'arret en pppoa (resolu) |
|
|
avec le script /etc/init.d/eagle-usr de la v1.9.8-r3
l'arret du modem provoque l'erreur suivante, visible dans les logs :
Quote: | Jul 15 23:17:35 moon eagle-usb: Stoping Link eagle
Jul 15 23:17:35 moon pppd[6097]: Terminating on signal 15.
Jul 15 23:17:35 moon pppd[6097]: Connection terminated.
Jul 15 23:17:35 moon pppd[6097]: Connect time 361.6 minutes.
Jul 15 23:17:35 moon pppd[6097]: Sent 480771063 bytes, received 582810209 bytes.
Jul 15 23:17:35 moon pppoa[6098]: read (AsyncReadFromPPP): Input/output error
Jul 15 23:17:35 moon pppd[6097]: Exit.
Jul 15 23:17:36 moon eagle-usb: Waiting for link eagle (ppp0) to go away
Jul 15 23:17:37 moon eagle-usb: Waiting for link eagle () to go away
... idem toutes les secondes ...
Jul 15 23:18:30 moon eagle-usb: Waiting for link eagle () to go away
Jul 15 23:18:30 moon eagle-usb: Link eagle () failed to stop
Jul 15 23:18:30 moon rc-scripts: Failed to stop 'pppd' |
il faut corrige la fonction stop_ppp dans le script comme il suit :
Code: | # Wait for connection to go away
while [ ${RETURNED} -ne 1 ] && [ ${LOOP} -le ${MAX_LOOP} ] ; do
let LOOP=LOOP+3
sleep 1
echo "Waiting for link $LINKNAME (${PPP_INTERFACE}) to go away" | ${$
find_eagle_pppif ;
|
devient
Code: | find_eagle_pppif ;
# Wait for connection to go away
while [ ${RETURNED} -ne 1 ] && [ ${LOOP} -le ${MAX_LOOP} ] ; do
let LOOP=LOOP+3
sleep 1
echo "Waiting for link $LINKNAME (${PPP_INTERFACE}) to go away" | ${$
# find_eagle_pppif ;
|
ainsi le probleme disparait, comme en temoignent les logs :
Quote: | Jul 15 23:58:34 moon pppd[13202]: Terminating on signal 15.
Jul 15 23:58:34 moon pppd[13202]: Connection terminated.
Jul 15 23:58:34 moon pppd[13202]: Connect time 27.6 minutes.
Jul 15 23:58:34 moon pppd[13202]: Sent 15674373 bytes, received 1207997 bytes.
Jul 15 23:58:34 moon pppd[13202]: Exit.
Jul 15 23:58:35 moon eagle-usb: Waiting for link eagle (ppp0) to go away
Jul 15 23:58:35 moon eagle-usb: Link eagle (ppp0) stopped |
|
|
Back to top |
|
|
Sleeper l33t
Joined: 12 Nov 2002 Posts: 667
|
Posted: Sun Jul 18, 2004 8:05 pm Post subject: |
|
|
OK.. Je rajoute et fais une r4 des que possible. Merci ! |
|
Back to top |
|
|
|