Issues with bittorrent init script

Bug #27654 reported by Andreas Simon
20
Affects Status Importance Assigned to Milestone
bittorrent (Debian)
Fix Released
Unknown
bittorrent (Ubuntu)
Fix Released
Medium
Matthias Klose

Bug Description

This is about bittorrent-3.4.2-6ubuntu1 in current Dapper.

Two issues with /etc/init.d/bittorrent:

1. The script will abort if /var/log/bittorrent/ doesn't already exist

# /etc/init.d/bittorrent start
Starting BitTorrent tracker: bttrack.bittorrent/etc/init.d/bittorrent: line
69: /var/log/bittorrent/bttrack.log: No such file or directory

2. The script doesn't check START_BTTRACK from /etc/default/bittorrent

In /etc/default/bittorrent we find the lines

 # If you want the bittorrent tracker to run, switch this to 1.
 START_BTTRACK=0

But START_BTTRACK is never checked in the init script.

Revision history for this message
Matthew East (mdke) wrote :

I don't know if this is the same bug, but the bittorrent init script is causing
a minor unsightly problem on shutting down on my dapper systems: there is no
[ok] after it, and the next init script line starts on the same line.

Matt Zimmerman (mdz)
Changed in bittorrent:
assignee: nobody → doko
Revision history for this message
Trent Lloyd (lathiat) wrote :

This is still an issue - while this is not started by default - it does have shudown links and so in a default dapper install (as of beta) - you see shutting down bittorrent tracker as you go down.

Revision history for this message
Simon Law (sfllaw) wrote :

Here are some more issues that I've found:

- There's no log_end_msg for starting.

- If stop failes, during a restart, the script doesn't even try start afterwards.

Changed in bittorrent:
status: Unconfirmed → Confirmed
Revision history for this message
Michael Trunner (trunneml) wrote :

Hello I have change the case block like that:

### Begin Code

case "$1" in
  start)
log_begin_msg "Starting $DESC: $NAME"
if [ "$START_BTTRACK" != "0" ]
then
 d_start
fi
log_end_msg $?
;;
  stop)
log_begin_msg "Stopping $DESC: $NAME"
d_stop
log_end_msg $?
;;
  restart|force-reload)
$0 stop
$0 start
log_end_msg $?
;;
  *)
N=/etc/init.d/${0##*/}
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

### End Code

I think thats enough to create the links in rc[X].d , because it now use the START_BTTRACK value from /etc/default/bittorrent.

Simon Law (sfllaw)
Changed in bittorrent:
status: Unconfirmed → Unknown
Changed in bittorrent:
status: Unknown → Fix Committed
Revision history for this message
Matthias Klose (doko) wrote :

fixed in edgy and feisty

Changed in bittorrent:
status: Confirmed → Fix Released
Changed in bittorrent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.