18 | | checksums md5 bfcdd49bf94900e610f2cc937d8980ef |
| 19 | checksums md5 f2e0a1ca0c49ae46ecad26a54df3e887 |
| 20 | |
| 21 | set tftp-root ${prefix}/var/${name}/ |
| 22 | |
| 23 | variant enable_upload description { If invoked with the server variant, tftp uploads |
| 24 | are enabled; without the server variant, this variant has no effect } {} |
| 25 | |
| 26 | variant server description { Install launchd scripts to run tftpd at system boot } { |
| 27 | startupitem.create yes |
| 28 | startupitem.name tftpd |
| 29 | if { ! [variant_isset enable_upload] } { |
| 30 | startupitem.executable ${prefix}/sbin/tftpd -L -s ${tftp-root} |
| 31 | } else { |
| 32 | startupitem.executable ${prefix}/sbin/tftpd -L -c -s ${tftp-root} |
| 33 | } |
| 34 | } |
35 | | ui_msg "\nTo use tftpd, you'll need to modify settings in inetd.conf/xinetd.d/launchd" |
36 | | ui_msg "depending on what you use on your system.\n\n" |
37 | | ui_msg "For inetd, something like:" |
38 | | ui_msg "tftp dgram udp wait nobody ${prefix}/sbin/in.tftd tftpd /private/tftpboot" |
39 | | ui_msg "should do it. And tell inetd to reload its configuration.\n\n" |
40 | | ui_msg "For xinetd (the default on Mac OS X 10.3), you should edit the file /etc/xinetd.d/tftp\n" |
41 | | ui_msg "and change the server setting from /usr/libexec/tftpd to ${prefix}/sbin/in.tftd\n" |
42 | | ui_msg "Then, use service(8) command to reload the xinetd configuration.\n\n" |
43 | | ui_msg "For launchd (the default on Mac OS X 10.4 Tiger), you'll need to change the \n" |
44 | | ui_msg "tftp.plist file in /System/Library/LaunchDaemons/. By changing the first string\n" |
45 | | ui_msg "value inside the ProgramArguments key from /usr/libexec/tftpd to ${prefix}/sbin/in.tftd\n" |
46 | | ui_msg "And start the server with the service(8) command.\n" |
| 57 | ui_msg "\n |
| 58 | |
| 59 | ***** Setup Instructions ***** |
| 60 | |
| 61 | To run tftpd manually for download only access, use this command: |
| 62 | sudo ${prefix}/sbin/tftpd -L -s <tftp-root-dir> |
| 63 | |
| 64 | To run tftpd manually and support tftp uploads, add \"-c\" to the command: |
| 65 | sudo ${prefix}/sbin/tftpd -L -c -s <tftp-root-dir> |
| 66 | |
| 67 | You may run tftpd at system boot on OS X 10.4 or 10.5 if you installed tftp-hpa |
| 68 | using the server variant; if so, you may load it using launchctl: |
| 69 | sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist |
| 70 | |
| 71 | By default, tftp-hpa listens to the tftp port specified in /etc/services (port 69) |
| 72 | on all local addresses. |
| 73 | |
| 74 | NOTE: When loading tftp-hpa using launchctl, make sure to place the files you want to serve |
| 75 | in ${tftp-root}, because that is the location set by the StartupItem. |
| 76 | |
| 77 | ******************************* |
| 78 | |
| 79 | If you wish to run tftpd in inetd mode, you may make an inetd compatible .plist |
| 80 | file and replace the one installed by MacPorts in /Library/LaunchDaemons. You |
| 81 | may use /System/Library/LaunchDaemons/tftp.plist as a template. |
| 82 | |
| 83 | \n" |