Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37636298
en ru br
Репозитории ALT
S:5.2-alt3
5.1: 5.0-alt1
4.1: 0.48-alt1
4.0: 0.48-alt1
3.0: 0.40-alt2
www.altlinux.org/Changes

Группа :: Сети/Передача файлов
Пакет: tftp

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

#!/bin/sh
#
# tftpd This shell script takes care of starting and stopping
# TFTP server.
#
# chkconfig: - 90 25
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
# processname: in.tftpd
# config: /etc/sysconfig/tftpd
# pidfile: /var/run/tftpd.pid

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

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

# Source TFTPD configuration.
SourceIfNotEmpty /etc/sysconfig/tftpd

PIDFILE=/var/run/tftpd.pid
LOCKFILE=/var/lock/subsys/tftpd
RETVAL=0

start()
{
local secure proto create

is_yes "$CREATE" && create="-c" || create=
if is_no "$SECURE"; then
secure=
else
secure="-s"
DIR="${DIR:-@BOOTDIR@}"
fi
if is_yes "$IPv6_ONLY"; then
proto="-6"
elif is_yes "$IPv4_ONLY"; then
proto="-4"
else
proto=
fi

start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --name tftpd --expect-user ${USER:-root} -- \
in.tftpd -P -l $secure $proto $create \
${USER:+-u $USER} \
${ADDRESS:+-a $ADDRESS} \
${UMASK:+-U $UMASK} \
${BLOCKSIZE:+-B $BLOCKSIZE} \
$OPTS \
"${DIR}"
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- tftpd
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

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

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