diff options
author | Mike Gilbert <floppym@gentoo.org> | 2016-03-06 17:11:07 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2016-03-06 17:14:04 -0500 |
commit | dc07b1d0d385c21c2d8ea848e563b3c4a6c2ef7b (patch) | |
tree | b3c7a02b3708b55b60b2136a65fb9588c4610b78 /net-p2p/transmission | |
parent | x11-misc/spacefm: Old version cleanup (diff) | |
download | gentoo-dc07b1d0d385c21c2d8ea848e563b3c4a6c2ef7b.tar.gz gentoo-dc07b1d0d385c21c2d8ea848e563b3c4a6c2ef7b.tar.bz2 gentoo-dc07b1d0d385c21c2d8ea848e563b3c4a6c2ef7b.zip |
net-p2p/transmission: Don't clobber download directory setting
Bug: https://bugs.gentoo.org/576640
Package-Manager: portage-2.2.27_p64
Diffstat (limited to 'net-p2p/transmission')
-rw-r--r-- | net-p2p/transmission/files/transmission-daemon.initd.10 | 23 | ||||
-rw-r--r-- | net-p2p/transmission/transmission-2.90-r1.ebuild (renamed from net-p2p/transmission/transmission-2.90.ebuild) | 0 |
2 files changed, 15 insertions, 8 deletions
diff --git a/net-p2p/transmission/files/transmission-daemon.initd.10 b/net-p2p/transmission/files/transmission-daemon.initd.10 index 7acb22286a6d..e1a7150cf026 100644 --- a/net-p2p/transmission/files/transmission-daemon.initd.10 +++ b/net-p2p/transmission/files/transmission-daemon.initd.10 @@ -20,20 +20,27 @@ runas_user=${runas_user:-transmission:transmission} retry="TERM/45/QUIT/15" start_pre() { - command_args=" - --config-dir ${config_dir} - --download-dir ${download_dir} - --pid-file ${pidfile} - ${TRANSMISSION_OPTIONS} - " + command_args="--config-dir ${config_dir} --pid-file ${pidfile}" command_user="${runas_user}" - checkpath -d -o ${runas_user} "${rundir}" /var/lib/transmission "${config_dir}" "${download_dir}" || return + # Call mkdir -p in case parent dirs are missing + mkdir -p "${rundir}" "${config_dir}" "${download_dir}" + + # Call checkpath to fixup permissions + checkpath -d -o "${runas_user}" "${rundir}" "${config_dir}" "${download_dir}" || return + + if [ ! -e "${config_dir}/settings.json" ]; then + # Only set download dir if settings don't exist + # https://bugs.gentoo.org/576640 + command_args="${command_args} --download-dir ${download_dir}" + fi if [ "${logfile}" != syslog ]; then - checkpath -d -o ${runas_user} /var/log/transmission || return + checkpath -d -o "${runas_user}" /var/log/transmission || return command_args="${command_args} --logfile ${logfile}" fi + + command_args="${command_args} ${TRANSMISSION_OPTIONS}" } reload() { diff --git a/net-p2p/transmission/transmission-2.90.ebuild b/net-p2p/transmission/transmission-2.90-r1.ebuild index 96c12efa4813..96c12efa4813 100644 --- a/net-p2p/transmission/transmission-2.90.ebuild +++ b/net-p2p/transmission/transmission-2.90-r1.ebuild |