### Patch to fix /etc/init.d/deluged from choosing the wrong user home ### directory when there username set in ${DELUGED_USER}, also appears ### inside of another username. --- /etc/init.d/deluged~ 2009-01-14 19:35:51.000000000 -0500 +++ /etc/init.d/deluged 2009-01-14 19:54:36.000000000 -0500 @@ -33,7 +33,7 @@ start() { checkconfig || return $? - DELUGED_USER_HOME=`getent passwd | grep $( echo "${DELUGED_USER}" | cut -d ':' -f 1 ) | cut -d ':' -f 6` + DELUGED_USER_HOME=`getent passwd | grep ^$( echo "${DELUGED_USER}" | cut -d ':' -f 1 ): | cut -d ':' -f 6` ebegin "Starting Deluged" start-stop-daemon --start --user "${DELUGED_USER}" \ --name deluged --pidfile /var/run/deluged.pid --background --make-pidfile \