LINUX.ORG.RU
ФорумAdmin

pppd


0

0

Здравсвуйте. Соединяюсь с провов через командy pppd call name, name лежит в /etc/ppp/peers. Куда прописать команду, чтобы она выполнялась перед закрытием соединения? В /etc/ppp/peers/name прописано disconnect /etc/ppp/peers/name-disconnect-chat, но это выполнятеся уже после закрытия соединения (интерфейса ppp0 уже нету), также ip-down выполнятеся после закрытия соединения. Соединения я закрываю по ctrl-c. Заранее спасибо. Не хочется свою "оболочку" писать к pppd, которая сперва бы выполняла команду, а потом убивала pppd.

anonymous

man pppd :)

/etc/ppp/auth-up
A program or script which is executed after the remote system successfully authenticates itself. It is executed with the parameters
interface-name peer-name user-name tty-device speed
Note that this script is not executed if the peer doesn't authenticate itself, for example when the noauth option is used.
/etc/ppp/auth-down
A program or script which is executed when the link goes down, if /etc/ppp/auth-up was previously executed. It is executed in the same manner with the same parameters as /etc/ppp/auth-up.
/etc/ppp/ip-up
A program or script which is executed when the link is available for sending and receiving IP packets (that is, IPCP has come up). It is executed with the parameters
interface-name tty-device speed local-IP-address remote-IP-address ipparam
/etc/ppp/ip-down
A program or script which is executed when the link is no longer available for sending and receiving IP packets. This script can be used for undoing the effects of the /etc/ppp/ip-up script. It is invoked in the same manner and with the same parameters as the ip-up script.

тебе ip-down видимо нада

SunPa
()
Ответ на: комментарий от SunPa

> ip-down видимо нада

Вряд ли :) ip-down запускается, когда соединения уже нет, а ему надо, когда ещё есть, то есть, непосредственно перед выдёргиванием шнурка модема из телефонной розетки :)

watashiwa_daredeska ★★★★
()
Ответ на: комментарий от watashiwa_daredeska

Верно, как я и написал в посте, ip-down выполняется уже после того, как закрывается интерфейс ppp0

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.