Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ERROR: "/etc/init.d/isdn" has syntax errors in it;
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Sat Jul 26, 2003 5:37 pm    Post subject: ERROR: "/etc/init.d/isdn" has syntax errors in it; Reply with quote

Hi all,

nachdem ich heute sehr gute Erfahrungen mit dem Forum gemacht habe, möchte ich ein kleines Problem vorstellen, welches für den Fachkundigen sicher leicht zu lösen ist.

Beim booten erhalte ich die Fehlermeldungen:

ERROR "/etc/init.d/isdn" has syntax errors in it; not executing...
ERROR "/etc/init.d/isdn.conf" has syntax errors in it; not executing...

Das steht in meiner /etc/init.d/isdn:

#!/bin/sh
#
#
LOCAL_NUMBER="meine Nummer"
REMOTE_NUMBER="Nummer meines Pro"
DRV_NAME="hisax"
DRV_TYPE="18"
DRV_PROT="2"
DRV_ID="hi0"
DEVICE="ippp0"

case "$1" in
start(
modprobe hisax type=18 protocol=2
isdnctrl addif $DEVICE
isdnctrl addphone $DEVICE out $REMOTE_NUMBER
isdnctrl eaz $DEVICE $LOCAL_NUMBER
isdnctrl l2_prot $DEVICE hdlc
isdnctrl l3_prot $DEVICE trans
isdnctrl encap $DEVICE syncppp
isdnctrl huptimeout $DEVICE 120
isdnctrl chargehup $DEVICE off
isdnctrl secure $DEVICE on

isdnctrl $DEVICE 0.0.0.0
route add default $DEVICE

ipppd
;;

stop)
route del default
/sbin/ifconfig $DEVICE down
isdnctrl delif $DEVICE
killall ipppd
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0

Ende

Das steht in der /etc/init.d/isdn.conf:

###############################################################################
#
# File /etc/init.d/isdn.conf generated by isdnctrl 3.2p1 on Tue Jul 22 20:07:52 2003
#
###############################################################################

[ISDNCTRL]
INTERFACES = {

[INTERFACE]
NAME = ippp0
EAZ = Meine EAZ
PHONE_OUT = Nummer meines Prov
SECURE = on
DIALMODE = auto
DIALMAX = 3
HUPTIMEOUT = 300
IHUP = on
CHARGEHUP = off
L2_PROT = hdlc
L3_PROT = trans
ENCAP = syncppp
}

Ende

Ist nur noch zu sagen, dass hisax beim booten geladen wird und ich lediglich, um eine Verbindung aufzubauen, folgendes in die bash eingebe:

isdnctrl readconf
ifconfig ippp0 0.0.0.0
route add default ippp0
ipppd
isdnctrl dial ippp0

Danach zeigt imon die Verbindung an und los gehts. Also kein großes Problem, aber ich häts gern eleganter. Ich bin kein Programierer, hab den Text mit der Vorlage abgeglichen, nun ja, hab halt nichts abweichendes gefunden, weshalb ich heute mal nachfrage.

Schon jetzt herzlichen Dank für Tipps, Kritik und Lösungen
Ma
Back to top
View user's profile Send private message
moe
Veteran
Veteran


Joined: 28 Mar 2003
Posts: 1289
Location: Potsdam / Germany

PostPosted: Sat Jul 26, 2003 9:25 pm    Post subject: Reply with quote

Das sind beides keine Initskripte, /etc/init.d/isdn hat zwar start/stop funktionen, ist aber kein skript nach dem runscript-schema..
/etc/init.d/isdn.conf hat in init.d gar nix verloren.
Mein Tipp:
Beide Dateien woanders hin schieben z.B. /etc/isdn
Dann in /etc/init.d/ eine neue Datei erstellen, kannst sie ja auch isdn nennen. Da tust du folgendes rein:
Code:

#!/sbin/runscript
start() {
        ebegin "Starte ISDN"
        /etc/isdn/isdn start > /dev/null
        eend $?
}
 
stop() {
        ebegin "Stoppe ISDN"
        /etc/isdn/isdn stop > /dev/null
        eend $?
}

dann noch n rc-update add isdn default und es sollte gehen..
Wenn dieses Skript nach oder vor irgendwelchen anderen Diensten gestartet werden soll (z.B. CAPI) müsstest noch ne depend, use oder provide Sektion einfügen..

HTH Maurice
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Sat Jul 26, 2003 9:41 pm    Post subject: Reply with quote

Danke moe,

werde deine Tipps morgen ausprobieren, denn eins habe ich gelernt:

Ändere das System nicht um Mitternacht!ma :?

Ich werde mich mit dem Ergebnis melden und bis dahin erstmal,

herzlichen Dank und gute Nacht

:D
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Sun Jul 27, 2003 7:15 am    Post subject: Reply with quote

Hallo moe,

hat funktioniert !! Danke für die Hilfe. :lol:
Back to top
View user's profile Send private message
moe
Veteran
Veteran


Joined: 28 Mar 2003
Posts: 1289
Location: Potsdam / Germany

PostPosted: Sun Jul 27, 2003 9:36 am    Post subject: Reply with quote

Quote:
Ändere das System nicht um Mitternacht!
Das ist gut, sollte man wirklich beherzigen.. :D

Freut mich dass es geklappt hat.

Gruss Maurice
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum