#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc ## ## rc.tftp -- Run-Commands ## %config tftp_enable="$openpkg_rc_def" tftp_listen="127.0.0.1:69" tftp_flags="" tftp_rootdir="@l_prefix@/pub" tftp_log_prolog="true" tftp_log_epilog="true" tftp_log_numfiles="10" tftp_log_minsize="1M" tftp_log_complevel="9" %start -p 100 -u @l_susr@ opServiceEnabled tftp || exit 0 opts="-l -u @l_nusr@ -m @l_prefix@/etc/tftp/tftpd.remap" if [ ".$tftp_listen" != . ]; then opts="$opts -a $tftp_listen" fi if [ ".$tftp_flags" != . ]; then opts="$opts $tftp_flags" fi @l_prefix@/sbin/tftpd $opts -s $tftp_rootdir %stop -p 200 -u @l_susr@ opServiceEnabled tftp || exit 0 if [ -f @l_prefix@/var/tftp/tftpd.pid ]; then kill -TERM `cat @l_prefix@/var/tftp/tftpd.pid` rm -f @l_prefix@/var/tftp/tftpd.pid >/dev/null 2>&1 || true fi %daily -u @l_susr@ opServiceEnabled tftp || exit 0 # rotate logfile shtool rotate -f \ -n${tftp_log_numfiles} -s${tftp_log_minsize} -d \ -z${tftp_log_complevel} -o@l_nusr@ -g@l_ngrp@ -m644 \ -P "${tftp_log_prolog}" \ -E "${tftp_log_epilog}" \ @l_prefix@/var/tftp/tftp.log