sci-misc/boinc: Fix suspend/resume commands in the init script.
authorSven Eden <yamakuzure@gmx.net>
Wed, 24 May 2017 07:29:35 +0000 (09:29 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 4 Jun 2017 17:02:35 +0000 (19:02 +0200)
Both suspend and resume do not work any more, at least with boinc-7.6.33.
The reason is, that fetching the project URLs require password authentication.

This commit adds the required steps to no longer get an authentication error
when trying to suspend/resume boinc.

Closes: https://github.com/gentoo/gentoo/pull/4732
Package-Manager: portage-2.3.6

sci-misc/boinc/boinc-7.2.44-r4.ebuild [moved from sci-misc/boinc/boinc-7.2.44-r3.ebuild with 100% similarity]
sci-misc/boinc/boinc-7.4.52-r4.ebuild [moved from sci-misc/boinc/boinc-7.4.52-r3.ebuild with 100% similarity]
sci-misc/boinc/boinc-7.6.33-r4.ebuild [moved from sci-misc/boinc/boinc-7.6.33-r3.ebuild with 100% similarity]
sci-misc/boinc/files/boinc.init

index ceeeac87145ee159e07da3f419dbae0d59b537da..23450a6857cc7851525b7c5d789ca46981d05d5d 100644 (file)
@@ -184,15 +184,17 @@ resume() {
        env_check || return 1
 
        local password=""
-       local master_urls=( \
-               $("${BOINCCMD}" --get_project_status | \
-                 sed -n 's/\s*master URL: //p') \
-       )
 
        if need_passwd_arg; then
                password="--passwd \"$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")\""
        fi
 
+       local master_urls=( \
+               $(cd "${RUNTIMEDIR}" ; \
+                 "${BOINCCMD}" ${password} --get_project_status | \
+                 sed -n 's/\s*master URL: //p') \
+       )
+
        for url in "${master_urls[@]}"; do
                ebegin "Resuming $url"
                start-stop-daemon --user "${USER}:${GROUP}" --quiet \
@@ -207,15 +209,17 @@ suspend() {
        env_check || return 1
 
        local password=""
-       local master_urls=( \
-               $("${BOINCCMD}" --get_project_status | \
-                 sed -n 's/\s*master URL: //p') \
-       )
 
        if need_passwd_arg; then
                password="--passwd \"$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")\""
        fi
 
+       local master_urls=( \
+               $(cd "${RUNTIMEDIR}" ; \
+                 "${BOINCCMD}" ${password} --get_project_status | \
+                 sed -n 's/\s*master URL: //p') \
+       )
+
        for url in "${master_urls[@]}"; do
                ebegin "Suspending $url"
                start-stop-daemon --user "${USER}:${GROUP}" --quiet \