Newsgroup: it.comp.os.linux.iniziare
Titolo: Mistero

Ciao a tutti 
Chiedo scusa in anticipo per la lunghezza del post.
Mi succede questo: lo script che troverete allegato l' ho usato fino
ad un mese fa senza problemi, serve per connettermi al mio provider
via isdn, ora ho reinstallato linux (debian 2.2) causa cambio pc, e
tutte le volte che provo a lanciarlo (dopo averlo opportunamente
modificato e reso eseguibile, e copiato in /usr/local/bin, che e'
inclusa nel path), ottengo la risposta:
"bash: dialisdn file o directory inesistente"
anche se il file ovviamente esiste.
------------iniza dialisdn--------------------------------------------
#!/bin/bash
set -x
# File 'dialisdn' - a sample ISDN start/stop script for a
semi-permanent
# 'leased-line' type connection
# This version makes the initial call to set up the connection.  
# Last updated: 30-Nov-2000 MW
#
# Run this script with:    dialisdn start | stop
#
# Note 1 : if you use this script, install it in /etc/ppp along with
#          ip-up.local and chmod both files to 777
#
# Note 2 : this script uses a number of system utilities such as :
#          route, rmmod, kill, killall, modprobe, ifconfig
# and ISDN-related utilities such as :
#          isdnctrl, ipppd
# so make sure your path can find them eg. /sbin /usr/sbin
DEVICE="ippp0"
DEVICE1="ippp1"
case "$1" in
start)
 
# Put your username here
# The same username and password must be in /etc/ppp/pap-secrets
 
USER="xxxxxxx"
# 128K Multilink flag
 ML_128K=no 
# ML_128K=yes
# Enter local and remote number here
# LOCAL_NUMBER notes:
# nnn1 = your ISDN telephone number #1
# sss1 = your SPID #1
# nnn2 = your ISDN telephone number #2
# sss2 = your SPID #2
# eg.  
# LOCAL_NUMBER1="8358662:0835866201"
# LOCAL_NUMBER2="8358664:0835866401"
LOCAL_NUMBER1="nnn1:sss1"
LOCAL_NUMBER2="nnn2:sss2"
REMOTE_NUMBER="xxx" 
# Set up your local inet ip-address and your destination ip-address
MY_IP_ADDRESS="0.0.0.0"
DEST_IP_ADDRESS="0.0.0.0"
# If you have loaded HiSax as a module (not recommended )then
uncomment 2/3 of these lines:
# insmod hisax type=38 protocol=4 id="HiSax" # for 2.2.x
# insmod hisax type=29 protocol=4 id="HiSax" # for 2.0.36
# sleep 30
# Forcibly kill all existing stuff!
 kill -SIGHUP ipppd
 ifconfig $DEVICE down
# Set up the first B-channel
 isdnctrl delif  $DEVICE 2>/dev/null
 isdnctrl delif  $DEVICE1 2>/dev/null
 sleep 2
# If you are having trouble getting ISDN to work satisfactorily, it
can be 
# very useful to capture the debug output that goes to
/var/log/messages 
# and to a junk file as below (uncomment the next 6 lines):
# hisaxctrl HiSax 1 0x3ff       # turn on generic debugging to
/var/log/messages
# hisaxctrl HiSax 11 0x3ff      # also turn on layer 1 debugging
# hisaxctrl HiSax 13 0x3ff      # also turn on layer 3 debugging
# rm junk			# remove any previous debug log file 
# cat /dev/isdnctrl0 > junk &	# debug output to junk - don't 
				# forget to stop the background cat 
				# by uncommenting the corresponding
				# lines in the stop script
# isdnctrl verbose 7           	# turn on debugging of D-channel to
junk
 isdnctrl addif  $DEVICE            # Create new interface 'DEVICE'
# isdnctrl pppbind $DEVICE 0	    # bind $DEVICE to channel 0
(optional)
 isdnctrl addphone $DEVICE out $REMOTE_NUMBER   # Set outgoung
phone-number
 isdnctrl eaz $DEVICE $LOCAL_NUMBER1             # Set local EAZ .. 
 isdnctrl l2_prot $DEVICE hdlc      # for sync PPP: set Level 2 to
HDLC
 isdnctrl l3_prot $DEVICE trans     # not really necessary, 'trans' is
default
 isdnctrl encap $DEVICE syncppp     # encap the IP Pakets in PPP
frames
 isdnctrl huptimeout $DEVICE 300      # Hangup-Timeout is 300 sec
 isdnctrl ihup $DEVICE off   	    # Turn off timeout on incoming
calls
 isdnctrl chargehup $DEVICE off     # Hangup before next Charge-Info
 isdnctrl secure $DEVICE off        # Accept only configured
phone-number
# isdnctrl status $DEVICE on         # Start the driver (2.0.36
kernel)
 isdnctrl dialmode $DEVICE auto	    # 2.2.x kernels only
# Configure the second B-channel (slave)
if [ ${ML_128K} = "yes" ]; then
 isdnctrl addslave $DEVICE $DEVICE1 
 isdnctrl addphone $DEVICE1 out $REMOTE_NUMBER   # Set outgoung
phone-number
 isdnctrl eaz $DEVICE1 $LOCAL_NUMBER2             # Set local EAZ .. 
 isdnctrl l2_prot $DEVICE1 hdlc      # for sync PPP: set Level 2 to
HDLC
 isdnctrl l3_prot $DEVICE1 trans     # not really necessary, 'trans'
is default
 isdnctrl encap $DEVICE1 syncppp     # encap the IP Pakets in PPP
frames
 isdnctrl huptimeout $DEVICE1 0      # Hangup-Timeout is 180 sec
 isdnctrl ihup $DEVICE1 off   	     # Turn off timeout on incoming
calls
 isdnctrl chargehup $DEVICE1 off     # Hangup before next Charge-Info
 isdnctrl secure $DEVICE1 off        # Accept only configured
phone-number
# isdnctrl status $DEVICE1 on         # Start the driver (2.0.36
kernel)
 isdnctrl dialmode $DEVICE1 auto     # 2.2.x kernels only
fi
#2.2.x
 ifconfig $DEVICE $MY_IP_ADDRESS pointopoint $DEST_IP_ADDRESS
#2.0.36
# ifconfig $DEVICE $MY_IP_ADDRESS pointopoint $DEST_IP_ADDRESS metric
1
# the next statement has been moved to the file "ip-up.local"
# route add default $DEVICE
# Start the ipppd deamon:
# set 'user' to get the right password from the pap-secrets file
# ipcp-accept-local ipcp-accept-remote : accept every IP address
# -vjccomp -ac -pc  : always disable
# -vj : disable VJ Compression .. reported to be more stable
# -cpp : disable cpp compression for Tigris access servers
# -bsdcomp : i4l-syncPPP driver doesn't support bsd-compression
# debug    : enable debugging - WARNING: ipppd will also log your
password 
# useifip  : get IP address information from the network interface
 ipppd user $USER \
	name $USER \
	+mp \
	mtu 1468 \
        mru 1468 \
	ipcp-accept-local ipcp-accept-remote \
	noipdefault \
	-vjccomp -ac -pc \
	-vj \
	-lzs \
        -bsdcomp \
        -detach \
	debug \
        useifip \
	defaultroute \
	/dev/$DEVICE /dev/$DEVICE1 &
 sleep 2
 isdnctrl dial $DEVICE
# For 128K multilink ppp
if [ ${ML_128K} = "yes" ]; then
 isdnctrl addlink $DEVICE
fi
sleep 2
;;
stop)
# Forcibly kill all existing stuff!
 kill -SIGHUP $(/bin/ps ax | \
	        /bin/grep ipppd | \
	        /bin/grep -v grep | \
	        /bin/awk '{print $1}')
# If you are logging debug commands using cat (see above), then 
# uncomment the following 4 lines:
# kill -9 $(/bin/ps ax | \
#	  /bin/grep cat | \
#	  /bin/grep -v grep | \
#	  /bin/awk '{print $1}')
 ifconfig $DEVICE down
 isdnctrl delif $DEVICE
 killall -9 ipppd
 route del default
# Uncomment the following line if hisax is a module:
# rmmod hisax
;;
*)
 echo "Usage: $0 start | stop"
 exit 1
esac
exit 0
----------------finicsce dialisdn----------------------------------
Bye GF
e-mail 
gi....@mindless.com
icq 7971778

 "bash: dialisdn file o directory inesistente"
Forse  (Forse)   l'errore  proviene  da  "dialisdn"   stesso,  cioe'  lo
script  ti dice  che non  trova  un file. Vedo,  proprio all'inizio,  un
"semi-permanent" che si sarebbe dovuto  trovare sulla riga precedente :)
Piu' in basso controlla pure "uncomment  2/3 of these lines:", "can be",
"/var/log/messages",  "junk", "(optional)"  e altre  molte righe  per la
medesima ragione :-)
-- 
                                                                     __
 __                                                              _  ///
| _        Student in Computer Science, Swiss Federal Institute  \\///
|__|iambo      of Technology - mailto:
ggia...@iiic.ethz.ch
       \X/