Forum » Operacijski sistemi » FreeBSD in ADSL nasvet
FreeBSD in ADSL nasvet
MrBrdo ::
Lep pozdrav.
Če ima kdo FreeBSD in se direktno povezuje na SIOL omrežje prek ADSL-ja, mu bo mogoče prav prišla skripta, ki ob bootu pred poganjanjem daemonov najprej počaka, da se ADSL poveže. Pri meni sem recimo opazil, da SSHd ne odpre porta na IPju ki mi ga dodeli SIOL, ker ob zagonu SSHdja ADSL še ni povezan in torej tisti IP takrat še ne obstaja. Aja btw, skripta je napisana za user-mode PPP in ne za kernel-mode.
Preberite commente za navodila. Skripta:
#!/bin/sh
#
# Filename: /etc/rc.d/ppp-wait
# Tested on FreeBSD 5.2.1 & 5.3
# Written by MrBrdo
#
# Script waits for pppd to connect before allowing execution
# of other applications that might need the connection
# provided by pppd
#
# !! Be sure to change the IP 193.189.160.11 below to the IP of your DNS server
# !! if you are not using SIOL ADSL, Slovenia.
testconnection() {
# Ping our DNS server to see if we are connected
CONNECT=`/sbin/ping -c 1 193.189.160.11 | grep packets | cut -d' ' -f4`
}
CONNECT="0"
echo "[PPP] Testing connection to see if we are connected..."
while [ "$CONNECT" = "0" ]; do
testconnection
if [ "$CONNECT" = "0" ]; then sleep 1; fi
done
echo "[PPP] Connected."
Če ima kdo FreeBSD in se direktno povezuje na SIOL omrežje prek ADSL-ja, mu bo mogoče prav prišla skripta, ki ob bootu pred poganjanjem daemonov najprej počaka, da se ADSL poveže. Pri meni sem recimo opazil, da SSHd ne odpre porta na IPju ki mi ga dodeli SIOL, ker ob zagonu SSHdja ADSL še ni povezan in torej tisti IP takrat še ne obstaja. Aja btw, skripta je napisana za user-mode PPP in ne za kernel-mode.
Preberite commente za navodila. Skripta:
#!/bin/sh
#
# Filename: /etc/rc.d/ppp-wait
# Tested on FreeBSD 5.2.1 & 5.3
# Written by MrBrdo
#
# Script waits for pppd to connect before allowing execution
# of other applications that might need the connection
# provided by pppd
#
# !! Be sure to change the IP 193.189.160.11 below to the IP of your DNS server
# !! if you are not using SIOL ADSL, Slovenia.
testconnection() {
# Ping our DNS server to see if we are connected
CONNECT=`/sbin/ping -c 1 193.189.160.11 | grep packets | cut -d' ' -f4`
}
CONNECT="0"
echo "[PPP] Testing connection to see if we are connected..."
while [ "$CONNECT" = "0" ]; do
testconnection
if [ "$CONNECT" = "0" ]; then sleep 1; fi
done
echo "[PPP] Connected."
MrBrdo
- zaklenil: moj_nick ()
moj_nick ::
Članek je prestavljen sem, prav tako zastavite morebitna vprašanja in komentarje v tisto temo.
110111001001010001010000
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Kratek uvod v FreeBSD (strani: 1 2 3 4 … 8 9 10 11 )Oddelek: Operacijski sistemi | 65969 (29707) | Prospekt |
» | PPP: Input/output errorOddelek: Omrežja in internet | 1493 (1331) | b |
» | slackware 9.0 in adslOddelek: Operacijski sistemi | 1179 (1044) | pajac |
» | adsl+debianOddelek: Omrežja in internet | 1531 (1143) | Gandalfar |
» | freescoOddelek: Omrežja in internet | 1822 (1648) | mile |