Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38946 - net-misc/atftp-0.6.2 default configuration incomplete
Summary: net-misc/atftp-0.6.2 default configuration incomplete
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Chuck Short (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-21 12:27 UTC by FieldySnuts
Modified: 2004-01-26 16:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FieldySnuts 2004-01-21 12:27:51 UTC
The default configuration for net-misc/atftp-0.6.2 is incomplete. At this point I am not quite sure what is missing.

calling /etc/init.d/atftp start results in:

 * Starting tftpd...
Usage: tftpd [options] [directory]
 [options] may be:
  -t, --tftpd-timeout <value>: number of second of inactivity before exiting
  -r, --retry-timeout <value>: time to wait a reply before retransmition
  -m, --maxthread <value>    : number of concurrent thread allowed
  -v, --verbose [value]      : increase or set the level of output messages
  --no-timeout               : disable 'timeout' from RFC2349
  --no-tisize                : disable 'tsize' from RFC2349
  --no-blksize               : disable 'blksize' from RFC2348
  --no-multicast             : disable 'multicast' from RFC2090
  --logfile                  : logfile to log logs to ;-)
  --daemon                   : run atftpd standalone (no inetd)
  --no-fork                  : run as a daemon, don't fork
  --user <user name>         : default is nobdy
  --group <group name>       : default is nogroup
  --port                     : port the server will listen
  --mcast_ttl                : ttl to used for multicast
  --mcast_addr <address list>: list/range of IP address to use
                               for multicast transfer
  --mcast_port <port range>  : ports to use for multicast transfer
  -h, --help                 : print this help
  -V, --version              : print version information

 [directories] must be a world readable/writable directories.
 By default /tftpboot is assumed.                                         [ !! ]

/tftpboot is not created, so I create it, and try again:

[directories] must be a world readable/writable directories.
 By default /tftpboot is assumed.                                         [ !! ]

World readable and writeable? This is not sane. Trying anyway:

 [directories] must be a world readable/writable directories.
 By default /tftpboot is assumed.                                         [ !! ]

drwxrwxrwx    2 root     root           48 Jan 21 13:27 tftpboot


So perhaps this is a script problem in init.d?

There are instances of ${TFTPD_ROOT} and ${TFTPD_OPTS} , but I see this set nowhere. There is nothing in /etc/conf.d/ related to this.

I created my own /etc/conf.d/atftp with the following:

TFTPD_ROOT=/tftpboot
#TFTPD_OPTS=

Tried again:

 [directories] must be a world readable/writable directories.
 By default /tftpboot is assumed.                                         [ !! ]

So back to world rw. Fine, we'll do chmod 777 /tftpboot:

And we get the same result. /tftpboot exists, owned by root.root and is mode 0777. I am doing what it wants.

So maybe it wants at least one option passed through $TFTPD_OPTS, so we make it "--user nobody --group nobody".

Still the same errors. Let's try to run it manually:

# atftpd --no-fork /tftpboot

Same error.

# atftpd --daemon --no-fork /tftpboot

This worked. --help was misleading in that it made it sound like --no-fork implied --daemon.

Curiously I changed the mode of /tftpboot to 755 and it did not complain about world rw dirs.


So the problems are:
- /etc/init.d/atftp calling for variables which should be defined by /etc/conf.d/atftp . This file does not exist.

- Creating that file and putting in the variables it seems to want did not solve the problem.

- Due to these problems atftpd cannot be run from the script put in /etc/init.d/ . It can be run manually, however.

- /tftpboot is not created.

I would like to present a solution but unfortunately I don't know what it is.
Comment 1 FieldySnuts 2004-01-21 12:46:41 UTC
I was able to get atftp to start from the init.d script with the following inside of the file /etc/conf.d/atftp that I had to create:

TFTPD_ROOT="/tftpboot"
TFTPD_OPTS="--daemon --user nobody --group nobody"

The critical missing part seems to have been --daemon.
Comment 2 Chuck Short (RETIRED) gentoo-dev 2004-01-26 16:33:41 UTC
Fixed typo in ebuild, thanks for the bug report.
Comment 3 FieldySnuts 2004-01-26 16:36:08 UTC
Thanks for the quick fix :) atftp works great for me, btw.