>> Edit article
이름
제목
패스워드
안녕하세요.하나로ADSL Pro 외장형 RAS 사용자입니다. 인터넷연결에대해서 여쭈어 볼려고 합니다. 리눅스는 래드헷 7.1입니다. 인터넷에 연결을 하여 리눅스공부를해볼려고 했는데 에러가 나네요. #!/bin/sh # # ras: A script that make connect ADSL service of Hanaro Corp. # # Version: @(#) /etc/rc.d/init.d/ras 3.2.2 # # chkconfig: 345 47 53 # description: A script that make connect and disconnect RAS ADSL service # via dana server of Hanaro Corp. # processname: ras # config: /etc/ras.conf # #@ 하나로통신 ADSL 프로 사용자중 리눅스 유저를 위한 허접한 스크립트입니다.. ^^;;; #@ upgraded by Arcy (contact: arcturus@hananet.net) # Loading configuration file . /etc/ras.conf # setting paths PATH=/bin:/sbin:/usr/bin:/usr/sbin # Source function library. . /etc/rc.d/init.d/functions # a function what calculate gateway setgateway() { gateway=`grep GATEWAY /etc/dhcpc/dhcpcd-$dev.info | cut -d = -f 2` # forced gateway if [ "$force_gateway" && $psudo = 0 ] ; then gateway=$force_gateway ; fi } getauth() { echo -n " getting IP : " dhcpcd -t $time -R $dev >> /dev/null || { failure "getting IP"; exit 1 ; } echo_success echo setgateway ftp $gateway 23 & result=`w3c "http://$gateway/dana?USERNAME=$userid&PASSW=$userpw&CALL=$call&COMMAND=SETUP_CALL" |grep '</H2>' ` ; } # See how we were called. case "$1" in start) echo "Starting RAS" getauth echo -n " getting authorization :" if [ "$result" = "<H2> The call is already active </H2>" -o "$result" = "<H2> Call established </H2>" ] ; then { success "made connection ($ip)" echo touch /var/lock/subsys/ras exit 0 ; } elif [ "$result" = "<H2> Sorry, you have no authorisation for this call </H2>" ] ; then { echo -n " error on configure." failure "getting authorization"; echo; $0 stop; exit 2 ; } elif [ "$result" = "<H2> Terminate your session, release and renew your IP stack, please ... </H2>" ] ; then { echo_success ; echo; echo "Switch IP"; $0 restart ; } else { echo -n "unknown error." failure "due to unknown error, connection" ; echo; $0 stop; exit 3 ; } fi ;; stop) echo "Shutdown RAS" echo -n " Closing connection :" killproc ftp echo echo -n " Release IP :" dhcpcd -k $dev success "connection closing" echo rm -f /var/lock/subsys/ras ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0 이 스크립트는 /etc/rc.d/init.d/ras 에 있는 적혀 져 있는 스크립을 수정하여 나온것 을 다시 기록하였슴니다. 그리고 물론 /etc/ras.conf에 제 id와 패수워드 기록했습니다. rpm -Uvh ras-3.2.2-1.noarch.rpm 이걸로 ras파일설치햇습니다. 음 근데 이런 에러가 나네요. [root@aks bin]# ras start Starting RAS getting IP : [OK] /usr/bin/ras: w3c:command not found getting authorization :/usr/bin/ras: [:missing `]' /usr/bin/ras: /sbin/: is a directory unknown error.[FAILED] Shutdown RAS Closing connection : [ OK ] Release IP :[ OK ] /usr/bin/ras: line 82: 1860 [root@aks bin]# ras stop Shutdown RAS Closing connection :[FAILED] Release IP :**** dhcpcd: not running [ OK ] [root@aks bin]# 으흑 고수님들에 가르침 부탁합니다 꿉벅~:)--좋은 가르침 항상 감사합니다.
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved