diff -ruN smeserver-tftp-server-1.2.old/createlinks smeserver-tftp-server-1.2/createlinks --- smeserver-tftp-server-1.2.old/createlinks 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/createlinks 2022-04-10 17:21:45.862568097 +0100 @@ -10,6 +10,8 @@ foreach my $file (qw( /etc/systemd/system-preset/49-koozali.preset /etc/hosts.allow + /usr/lib/systemd/system/tftp.service.d/50koozali.conf + /usr/lib/systemd/system/tftp.socket.d/50koozali.conf )) { templates2events( $file, $event ); @@ -29,4 +31,5 @@ #safe_symlink("/var/service/tftpd", "root/service/tftpd"); #service_link_enhanced("tftpd", "S85", "7"); #service_link_enhanced("tftpd", "K25", "0"); -templates2events("/etc/hosts.allow", qw(tftpd-conf)); + +# templates2events("/etc/hosts.allow", qw(tftpd-conf)); diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/access smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/access --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/access 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/access 2006-03-20 09:42:00.000000000 +0000 @@ -0,0 +1 @@ +private \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/directory smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/directory --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/directory 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/directory 2006-03-20 09:44:03.000000000 +0000 @@ -0,0 +1 @@ +/tftpboot \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/log smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/log --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/log 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/log 2006-03-20 09:42:53.000000000 +0000 @@ -0,0 +1 @@ +normal \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/privilege smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/privilege --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/privilege 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/privilege 2022-04-04 15:59:05.988365500 +0100 @@ -0,0 +1 @@ +ro \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/status smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/status --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/status 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/status 2004-03-12 06:44:39.000000000 +0000 @@ -0,0 +1 @@ +disabled diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/timeout smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/timeout --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/timeout 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/timeout 2022-04-04 15:59:05.988365500 +0100 @@ -0,0 +1 @@ +default \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/type smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/type --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/type 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/type 2004-03-14 22:13:47.000000000 +0000 @@ -0,0 +1 @@ +service \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/UDPPort smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/UDPPort --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/UDPPort 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/UDPPort 2006-03-20 09:42:39.000000000 +0000 @@ -0,0 +1 @@ +69 \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/user smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/user --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftp/user 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftp/user 2022-04-04 15:59:05.992365565 +0100 @@ -0,0 +1 @@ +nobody diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/access smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/access --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/access 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/access 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -private \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/directory smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/directory --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/directory 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/directory 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -/tftpboot \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/log smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/log --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/log 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/log 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -normal \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/privilege smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/privilege --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/privilege 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/privilege 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -ro \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/status smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/status --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/status 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/status 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -disabled diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/timeout smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/timeout --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/timeout 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/timeout 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -default \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/type smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/type --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/type 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/type 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -service \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/UDPPort smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/UDPPort --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/UDPPort 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/UDPPort 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -69 \ No newline at end of file diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/user smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/user --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/defaults/tftpd/user 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/defaults/tftpd/user 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -nobody diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/migrate/tftpd.v10 smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/migrate/tftpd.v10 --- smeserver-tftp-server-1.2.old/root/etc/e-smith/db/configuration/migrate/tftpd.v10 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/db/configuration/migrate/tftpd.v10 2022-04-11 10:07:40.299370649 +0100 @@ -0,0 +1,10 @@ +{ + my $tftpd = $DB->get("tftpd") or return; + + my $tftp = $DB->get("tftp") || + $DB->new_record("tftp", { type => "service" }); + + $tftp->merge_props($tftpd->props); + + $tftpd->delete; +} diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/etc/hosts.allow/tftp smeserver-tftp-server-1.2/root/etc/e-smith/templates/etc/hosts.allow/tftp --- smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/etc/hosts.allow/tftp 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/templates/etc/hosts.allow/tftp 2022-04-04 16:10:44.308793024 +0100 @@ -0,0 +1,3 @@ +{ + $DB->hosts_allow_spec('tftp', 'in.tftpd'); +} diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/etc/hosts.allow/tftpd smeserver-tftp-server-1.2/root/etc/e-smith/templates/etc/hosts.allow/tftpd --- smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/etc/hosts.allow/tftpd 2022-04-04 15:59:16.501537530 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/templates/etc/hosts.allow/tftpd 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -{ - $DB->hosts_allow_spec('tftpd', 'in.tftpd'); -} diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/10Unit smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/10Unit --- smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/10Unit 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/10Unit 2022-04-10 17:29:28.925132153 +0100 @@ -0,0 +1,7 @@ + +[Unit] +Description=Tftp Server +Requires=tftp.socket +Documentation=man:in.tftpd +After=network-online.target +Wants=network-online.target diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/20Service smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/20Service --- smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/20Service 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/20Service 2022-04-11 10:06:43.155435534 +0100 @@ -0,0 +1,48 @@ +{ + my $blocksize = $tftp{blocksize} || "1468"; + my $verbosity = "-v"; + my $log = $tftp{log}; + my $refuse = $tftp{refuse}; + my $privilege = $tftp{privilege} | ""; + my $user = $tftp{user} || ""; + + # Now only relevant if you run under xinetd + my $timeout = $tftp{timeout} || ""; + + if ( $log eq "verbose" ) { + $verbosity = "-vv"; + } + elsif ( $log eq "disabled" ) { + $verbosity = ""; + } + + if ( $refuse ne "" ) { + $refuse = "-r $refuse"; + } + + if ( $blocksize <= "512" ) { + $blocksize = "512"; + } + elsif ( $blocksize >= "65464" ) { + $blocksize = "65464"; + } + + if ( $privilege eq "rw" ) { + $privilege = "-c"; + } + + if ( $user ne "" ) { + $user = "-u $user"; + } + + $OUT .= "[Service]\n"; + $OUT .= "Options: man in.tftpd\n"; + $OUT .= "ExecStartPre=/bin/sleep 10\n"; + $OUT .= " \n"; + $OUT .= "ExecStart=\n"; + $OUT .= "ExecStart=/usr/sbin/in.tftpd -s /tftpboot $verbosity -B $blocksize $user $refuse $privilege\n"; + $OUT .= " \n"; + $OUT .= "StandardInput=socket\n"; + +} + diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/30Install smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/30Install --- smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/30Install 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.service.d/50koozali.conf/30Install 2022-04-10 17:30:00.373645860 +0100 @@ -0,0 +1,4 @@ + +[Install] +WantedBy=sme-server.target +Also=tftp.socket diff -ruN smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.socket.d/50koozali.conf/20Socket smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.socket.d/50koozali.conf/20Socket --- smeserver-tftp-server-1.2.old/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.socket.d/50koozali.conf/20Socket 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-tftp-server-1.2/root/etc/e-smith/templates/usr/lib/systemd/system/tftp.socket.d/50koozali.conf/20Socket 2022-04-11 10:07:16.314978164 +0100 @@ -0,0 +1,21 @@ +{ + + my $interfaceIP = "127.0.0.1"; + my $localIP = ${LocalIP}; + my $port = $tftp{UDPPort}; + my $access = $tftp{access}; + + if ( $access eq "public" ) { + $interfaceIP = "0.0.0.0"; + } + elsif ( $access eq "private" ) { + $interfaceIP = $localIP; + } + + $OUT .= "[Socket]\n"; + $OUT .= "ListenDatagram=\n"; + $OUT .= "ListenDatagram=$interfaceIP:$port\n"; + $OUT .= "FreeBind=True\n"; + +} + diff -ruN smeserver-tftp-server-1.2.old/root/usr/lib/systemd/system/tftp.service.d/50koozali.conf smeserver-tftp-server-1.2/root/usr/lib/systemd/system/tftp.service.d/50koozali.conf --- smeserver-tftp-server-1.2.old/root/usr/lib/systemd/system/tftp.service.d/50koozali.conf 2022-04-04 15:59:16.502537546 +0100 +++ smeserver-tftp-server-1.2/root/usr/lib/systemd/system/tftp.service.d/50koozali.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -[Install] -WantedBy=sme-server.target - diff -ruN smeserver-tftp-server-1.2.old/root/var/service/tftpd/log/run smeserver-tftp-server-1.2/root/var/service/tftpd/log/run --- smeserver-tftp-server-1.2.old/root/var/service/tftpd/log/run 2022-04-04 15:59:16.501537530 +0100 +++ smeserver-tftp-server-1.2/root/var/service/tftpd/log/run 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -#!/bin/sh - -#---------------------------------------------------------------------- -# copyright (C) 2003 Mitel Networks Corporation -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Technical support for this program is available from Mitel Networks -# Please visit our web site www.mitel.com/sme/ for details. -#---------------------------------------------------------------------- -exec \ - /usr/local/bin/multilog t s5000000 \ - /var/log/tftpd diff -ruN smeserver-tftp-server-1.2.old/root/var/service/tftpd/run smeserver-tftp-server-1.2/root/var/service/tftpd/run --- smeserver-tftp-server-1.2.old/root/var/service/tftpd/run 2022-04-04 15:59:16.501537530 +0100 +++ smeserver-tftp-server-1.2/root/var/service/tftpd/run 1970-01-01 01:00:00.000000000 +0100 @@ -1,82 +0,0 @@ -#!/bin/bash - -#db configuration show tftpd -#Database: configuration -#Key: tftpd -#PROP: status VALUES: enabled/disabled -#PROP: access VALUES: private/public/localhost -#PROP: log VALUES: normal/verbose/disabled -#PROP: user VALUES: root/nobody (or any other valid user) -#PROP: privelege VALUES: ro/rw -#PROP: timeout: VALUES: default/300 (secounds, 900 is the default) -#PROP: UDPPort: VALUES: 69 -#PROP: directory VALUES: /tftpboot (or any other directory) -#PROP: refuse VALUES: (any tftp option that you need to disable) - -TFTPD_STATUS=$(/sbin/e-smith/db configuration getprop tftpd status); -if [ $TFTPD_STATUS == "enabled" ]; then - TFTPD_ACCESS=$(/sbin/e-smith/db configuration getprop tftpd access); - TFTPD_LOG=$(/sbin/e-smith/db configuration getprop tftpd log); - TFTPD_USER=$(/sbin/e-smith/db configuration getprop tftpd user); - TFTPD_PRIVILEGE=$(/sbin/e-smith/db configuration getprop tftpd privilege); - TFTPD_TIMEOUT=$(/sbin/e-smith/db configuration getprop tftpd timeout); - TFTPD_UDPPORT=$(/sbin/e-smith/db configuration getprop tftpd UDPPort); - TFTPD_DIRECTORY=$(/sbin/e-smith/db configuration getprop tftpd directory); - TFTPD_REFUSE=$(/sbin/e-smith/db configuration getprop tftpd refuse); - TFTPD_BLKSIZE=$(/sbin/e-smith/db configuration getprop tftpd blksize); - - # If BLKSIZE is set - if [ ! -z $TFTPD_BLKSIZE ]; then - #echo "Block size $TFTPD_BLKSIZE" - if [ "$TFTPD_BLKSIZE" -le "512" ] ; then - TFTPD_BLKSIZE=1500; - elif [ "$TFTPD_BLKSIZE" -ge "65464" ] ; then - TFTPD_BLKSIZE=65464; - fi - #echo "Now we have $TFTPD_BLKSIZE" - fi - #echo "Block size is $TFTPD_BLKSIZE" - - TFTPD_ACCESS_SETTING="127.0.0.1"; - if [ $TFTPD_ACCESS == "public" ]; then - TFTPD_ACCESS_SETTING="0.0.0.0"; - elif [ $TFTPD_ACCESS == "private" ]; then - TFTPD_ACCESS_SETTING=$(/sbin/e-smith/db configuration get LocalIP); - fi - - TFTPD_LOG_SETTING="-v"; - if [ $TFTPD_LOG == "verbose" ]; then - TFTPD_LOG_SETTING="-vv"; - elif [ $TFTPD_LOG == "disabled" ]; then - TFTPD_LOG_SETTING=""; - fi - - TFTPD_PRIVILEGE_SETTING="" - if [ $TFTPD_PRIVILEGE == "rw" ]; then - TFTPD_PRIVILEGE_SETTING="-c"; - fi - - TFTPD_TIMEOUT_SETTING="" - if [ $TFTPD_TIMEOUT != "default" ]; then - TFTPD_TIMEOUT_SETTING="-t $TFTPD_TIMEOUT"; - fi - - TFTPD_REFUSE_SETTING="" - if [ "$TFTPD_REFUSE" != "" ]; then - TFTPD_REFUSE_SETTING="-r $TFTPD_REFUSE"; - fi - - TFTPD_BLKSIZE_SETTING="" - if [ "$TFTPD_BLKSIZE" != "" ]; then - TFTPD_BLKSIZE_SETTING="-B $TFTPD_BLKSIZE"; - fi - - cd / - exec 2>&1 - exec udpsvd -h $TFTPD_LOG_SETTING \ - $TFTPD_ACCESS_SETTING $TFTPD_UDPPORT \ - in.tftpd $TFTPD_LOG_SETTING $TFTPD_PRIVILEGE_SETTING \ - -u $TFTPD_USER $TFTPD_TIMEOUT_SETTING $TFTPD_REFUSE_SETTING $TFTPD_BLKSIZE_SETTING -s $TFTPD_DIRECTORY -else - /usr/bin/runsvctrl down . -fi