I have configured ushare on fedora 12 to start as a service during boot (much reading and reference to methods all over the web).
I get an error in the /var/log/boot.log as follows:
Starting ushare: ioctl: Cannot assign requested address [FAILED]
There is no mention of network interface not being available like in other posts, or any hint of what the 'requested address' actually
is.
I have renamed the /etc/rc3.d/S75ushare (rc3 to rc6) to /etc/rc3.d/S99ushare to make sure it starts after everything else.
If I start this service manually after I have logged on:
$sudo service ushare start
...it works!.
The firewall on the ushare server is disabled, server is 'wired' to my router (DG834) which is firewalled.
Here is the configuration details:
/etc/ushare.conf:
Code:
# /etc/ushare.conf
# Configuration file for uShare
# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME=noake_media
# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
USHARE_IFACE=eth0
# Port to listen to (default is random from IANA Dynamic Ports range)
# Ex : USHARE_PORT=49200
USHARE_PORT=49200
# Port to listen for Telnet connections
# Ex : USHARE_TELNET_PORT=1337
USHARE_TELNET_PORT=
# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
USHARE_DIR=/var/shared/Downloads
# Use to override what happens when iconv fails to parse a file name.
# The default uShare behaviour is to not add the entry in the media list
# This option overrides that behaviour and adds the non-iconv'ed string into
# the media list, with the assumption that the renderer will be able to
# handle it. Devices like Noxon 2 have no problem with strings being passed
# as is. (Umlauts for all!)
#
# Options are TRUE/YES/1 for override and anything else for default behaviour
USHARE_OVERRIDE_ICONV_ERR=1
# Enable Web interface (yes/no)
USHARE_ENABLE_WEB=yes
# Enable Telnet control interface (yes/no)
USHARE_ENABLE_TELNET=no
# Use XboX 360 compatibility mode (yes/no)
USHARE_ENABLE_XBOX=yes
# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
USHARE_ENABLE_DLNA=yes
/etc/init.d/ushare
I tried to get verbose logging by inserting OPTIONS="-v" - it did not help.
Code:
#!/bin/sh
#
# ushare This shell script takes care of starting and stopping ushare.
#
# chkconfig: - 75 25
# description: uShare UPnP A/V Media Server.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
OPTIONS="-v"
prog=ushare
DESC="UPnP A/V Media Server"
[ -r "/etc/ushare.conf" ] && . /etc/ushare.conf
# abort if no shared directory is defined
[ -z "$USHARE_DIR" ] && exit 0
start() {
echo -n $"Starting $prog: "
daemon --user ushare $prog -d -D
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
}
reload() {
echo -n $"Reloading $prog: "
killproc $prog -HUP
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start
fi
;;
reload)
reload
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status"
exit 1
esac
exit $RETVAL