Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#25185 - rc.d Script for xmms2 needs to sleep for one second to work

Attached to Project: Community Packages
Opened by Björn Roberg (roobie) - Wednesday, 20 July 2011, 08:16 GMT
Last edited by Sergej Pupykin (sergej) - Wednesday, 20 July 2011, 09:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
# rc.d start|restart xmms2
This fails, because apparently it needs to sleep for one second after starting the daemon, so as to give the daemon to launch before registering it.

Additional info:
* package version(s)
xmms2 0.7DrNo-8
xmms-git 20110620-1

* config and/or log files etc.
proposed rc.d-script (only change is the sleep 1-line. The idea is taken from AUR-package xmms2-git-oss 20081113-1):
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/xmms2d.conf

PID=`pidof xmms2d xmms2-et`
case "$1" in
start)
stat_busy "Starting xmms2d"
[ -z "$PID" ] && su -c '/usr/bin/xmms2-launcher $XMMS2_PARAMETERS 1>/dev/null 2>/dev/null' - $XMMS2_USER
sleep 1
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon xmms2d
stat_done
fi
;;
stop)
stat_busy "Stopping xmms2d"
[ ! -z "$PID" ] && su -c '/usr/bin/xmms2 quit &>/dev/null' - $XMMS2_USER
sleep 4
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon xmms2d
stat_done
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0


Steps to reproduce:
try using rc.d-script from a fresh install of any of above mentioned packages.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Wednesday, 20 July 2011, 09:29 GMT
Reason for closing:  Fixed
Comment by Björn Roberg (roobie) - Wednesday, 20 July 2011, 08:36 GMT
Sorry, should've attached the (proposed and fixed) script before, so doing it now.
   xmms2d (0.7 KiB)
Comment by Sergej Pupykin (sergej) - Wednesday, 20 July 2011, 09:03 GMT
Did not understand reason for sleep 1. It works fine for me without it.

# /etc/rc.d/xmms2d start
:: Starting xmms2d [DONE]
Comment by Sergej Pupykin (sergej) - Wednesday, 20 July 2011, 09:28 GMT
I add waiting for daemon shut down. Probably it should help.

Loading...