Opened 13 years ago
Closed 12 years ago
#31737 closed defect (fixed)
tftp-hpa: Starting and stopping seems flaky
Reported by: | clarityandobscurity (The Sense of Mystery) | Owned by: | markd@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.3 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | tftp-hpa |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I installed tftp-hpa +server and it started automatically.
I see it has configuration in /Library/LaunchDaemons/org.macports.tftpd.plist
I went and edited that configuration (added -B 512 and removed -s), and now I try to restart the tftp server.
I get
$ ps -A | grep tftp 8964 ?? 0:00.01 /opt/local/bin/daemondo --label=tftpd --start-cmd /opt/local/sbin/tftpd -L -s /opt/local/var/tftp-hpa/ ; --pid=exec 8965 ?? 0:00.00 /opt/local/sbin/tftpd -L -s /opt/local/var/tftp-hpa/
In daemondo's help it says what it says about SIGHUP and SIGTERM. But no matter how, how many times and how passionately I hang up, terminate or kill either of the processes, or both at the same time, nothing changes.
There is also:
> unload tftp-hpa Error: Target org.macports.unload returned: Launchd plist /Library/LaunchDaemons/org.macports.tftp-hpa.plist was not found Log for tftp-hpa is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_tftp-hpa/tftp-hpa/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets> > load tftp-hpa Error: Target org.macports.load returned: Launchd plist /Library/LaunchDaemons/org.macports.tftp-hpa.plist was not found Log for tftp-hpa is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_tftp-hpa/tftp-hpa/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
Of course it fails because the file is called tftpd.plist and there is no tftp-hpa.plist
But there is also:
$ sudo launchctl unload /Library/LaunchDaemons/org.macports.tftpd.plist launchctl: no plist was returned for: /Library/LaunchDaemons/org.macports.tftpd.plist launchctl: no plist was returned for: /Library/LaunchDaemons/org.macports.tftpd.plist nothing found to unload $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist launchctl: no plist was returned for: /Library/LaunchDaemons/org.macports.tftpd.plist launchctl: no plist was returned for: /Library/LaunchDaemons/org.macports.tftpd.plist nothing found to load
Change History (4)
comment:2 Changed 13 years ago by clarityandobscurity (The Sense of Mystery)
comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Owner: | changed from macports-tickets@… to markd@… |
Summary: | Starting and stopping tftp-hpa seems flaky → tftp-hpa: Starting and stopping seems flaky |
The perhaps not very obvious reason why "port load" and "port unload" use the wrong name for the plist is that startupitem.name is set only in the +server variant. So it should work if you:
sudo port load tftp-hpa +server sudo port unload tftp-hpa +server
This is silly though, and in fact there's no reason for the +server variant to exist at all anymore; it should be removed, and the launchd plist should be created always.
While we're at it, the +enable_upload variant could be renamed; we don't like variant names beginning with "enable"/"disable"/"with"/"without"/"no"/etc.
comment:5 Changed 12 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
An update. The plist didn't work because I commented out the line with -s with #. Now launchctl loads and unloads tftpd.plist with success.
The remaining problem is that port load and port unload refer to a nonexistent plist.