Opened 5 years ago

#13823 new defect

ftpd-topfield not ingesting config options correctly

Reported by: anonymous Owned by: developers
Priority: normal Milestone:
Component: packages Version: Attitude Adjustment 12.09
Keywords: ftpd-topfield Cc:


The default options in /etc/config/ftpd-topfield are intended to disable turbo mode and ELPF FTP listings. So start ftpd-topfield as:

ftpd-topfield -D -P 21

However when /etc/init.d/ftpd-topfield starts the ftpd-topfield (as a daemon) these options are ignored, and turbo mode and ELPF FTP listings are enabled. So actually starts ftpd-topfield as:

ftpd-topfield -D --turbo -P 21 -E

Reuse of the $turbo and $elpf variables in lines 18 & 21 of /etc/init.d/ftpd-topfield means that the ${turbo:+--turbo } and ${elpf:+-E} variable expansions on line 23 are not working as intended.

Renaming these secondary variables (I just prefixed with an underscore) going things working correctly for me:

case "$turbo" in
    yes|on|enabled|1) _turbo=1;;
case "$elpf" in
    yes|on|enabled|1) _elpf=1;;
TOPFIELD_ARGS="-D ${_turbo:+--turbo }${port:+-P $port }${_elpf:+-E}"

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.