rc.tftp 677 B

1234567891011121314151617181920212223242526272829
  1. #!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
  2. ##
  3. ## rc.tftp-hpa -- Run-Commands for TFTP Daemon
  4. ##
  5. %config
  6. tftp_enable="yes"
  7. tftp_listen=""
  8. tftp_flags=""
  9. tftp_rootdir="@l_prefix@/pub"
  10. %start -p 100 -u root
  11. if opServiceEnabled tftp; then
  12. opts="-l -u @l_nusr@ -m @l_prefix@/etc/tftp/tftpd.remap"
  13. if [ ".$tftp_listen" != . ]; then
  14. opts="$opts -a $tftp_listen"
  15. fi
  16. if [ ".$tftp_flags" != . ]; then
  17. opts="$opts $tftp_flags"
  18. fi
  19. @l_prefix@/sbin/tftpd $opts -s $tftp_root $tftp_root
  20. fi
  21. %stop -p 200 -u root
  22. if opServiceEnabled tftp; then
  23. @l_prefix@/sbin/rndc stop
  24. fi