Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37832452
en ru br
Репозитории ALT
S:1.10.0-alt2
5.1: 1.7.2-alt1
4.1: 1.7.2-alt0.M41.1
4.0: 1.7.2-alt0.M40.1
3.0: 1.6.0-alt1
www.altlinux.org/Changes

Группа :: Сети/Прочее
Пакет: pptp-client

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#! /bin/sh
#
# chkconfig: - 11 89
# description: Starts and stops PPTP connection.
# processname: pptptunnel
# config: /etc/sysconfig/network
# config: /etc/sysconfig/pptp


WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

SourceIfNotEmpty /etc/sysconfig/network
SourceIfNotEmpty /etc/sysconfig/pptp

PIDFILE=/var/run/ppp-$PPTP_TUNNEL.pid
LOCKFILE=/var/lock/subsys/pptptunnel
RETVAL=0

SERVICE_NAME="\"$PPTP_TUNNEL\" PPTP tunnel"

start()
{
is_yes "$NETWORKING" || return 0

msg_starting "$SERVICE_NAME"

if [ "x$PPTP_TUNNEL" = "x" ]; then
echo -n "tunnel not defined!"
failure "tunnel not defined, startup"
exit 1
fi

start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root --no-announce -- \
pppd call $PPTP_TUNNEL updetach linkname $PPTP_TUNNEL
RETVAL=$?

return $RETVAL
}

stop()
{
msg_stopping "$SERVICE_NAME"
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root --no-announce pppd
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root pppd
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|reload|condstop|condrestart|condreload|status}"
RETVAL=1
esac

exit $RETVAL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin