SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Check the BIN_DIR in rc.boinc. The buildscript assumes you are building for DATADIR=/home/xxxx/.boinc_data to run /usr/bin/boincgui.sh script to launch boincmgr. You need to manually edit /etc/rc.d/rc.boinc to set the correct data path.
Code:
BOINC_DIR=/var/lib/boinc_data # directory of boinc files
BOINC_BIN=boinc # name of the boinc binary
BOINC_USER=root # user that will run boinc process
BOINC_OPTIONS="--dir $BOINC_DIR --redirectio"
# "--dir $BOINC_DIR --daemon" will send logs syslog instead of
# stdoutdae.txt and stderrdae.txt
Check if the boinc binaries changed for 7.20. My script assumes:
Code:
$ ls -l boinc*
-rwxr-xr-x 1 root root 1242136 May 1 20:28 boinc*
-rwxr-xr-x 1 root root 314776 May 1 20:28 boinccmd*
-rwxr-xr-x 1 root root 1225 May 1 20:28 boincgui.sh*
-rwxr-xr-x 1 root root 3453056 May 1 20:28 boincmgr*
-rwxr-xr-x 1 root root 278096 May 1 20:28 boincscr*
As stated in Slackbuilds.org FAQ, somewhere, buildscripts are tested for the source VERSION specified. Other versions might work. YMMV.
Can you provide more detail on that "No such file or directory"? boinc log, cli output?
[LIST=1][*]Check the BIN_DIR in rc.boinc. The buildscript assumes you are building for DATADIR=/home/xxxx/.boinc_data to run /usr/bin/boincgui.sh script to launch boincmgr. You need to manually edit /etc/rc.d/rc.boinc to set the correct data path.
I did but some months/years ago your build script did wrong (IIRC had literal rather than interpreted tilde) so had to hardcode in... do I still need to (I use different BOINC computers/users so would be nice if no longer have)?
Quote:
[*]Check if the boinc binaries changed for 7.20[...]
Can you provide more detail on that "No such file or directory"? boinc log, cli output?
I ran with variables of this form (worked before); only output was in my original report but if keeps happening I can get logs at least when Northern hemisphere season becomes less hot.
Code:
BOINC_DIR=/home/user/.boinc_data # directory of boinc files
BOINC_BIN=boinccmd # name of the boinc binary
BOINC_USER=root # user that will run boinc process
BOINC_OPTIONS="--dir $BOINC_DIR --redirectio --join_acct_mgr https://grcpool.com/ user password"
Sorry, been a bit busy and have neglected LQ. As soon as SBo releases wxWidgets-3.2, I'll have boinc-7.20 ready. I'll fix rc.boinc to use the buildscript path.
Also, you have the wrong BOINC_BIN, I think. boinccmd is the CLI version of boincmgr that sends commnads to boinc which runs the project apps. boincmd does not launch boinc and expects it to be already running. AFAIK, once you join an acct mgr, that should get saved in a .boinc-something. Not sure, since I always run boincmgr, which does launch the boinc client (it has an option to do so), and remembers the previously attached mgr (.
Note: To control, view, manipulate headless boinc clients, you need to turn and configure RPC to access the host from another host, assuming you don't want to login is via ssh to run boinccmd.
Once you start boinc, to attach to your acct mgr via boinccmd.
Yes, but the new rc script doesn't do as much as mine (you can use any this).
Code:
#!/bin/sh
# start/stop/restart BOINC
# Start BOINC.
boinc_start()
{
cd /home/user/.boinc_data
su user -c /usr/bin/boinc&
su user -c "/usr/bin/boinccmd --join_acct_mgr https://grcpool.com/ username password&"
su user -c /usr/bin/boincmgr&
cd
}
# Restart BOINC.
boinc_restart()
{
killall boinc
cd /home/d/.boinc_data
su user -c /usr/bin/boinc&
su user -c "/usr/bin/boinccmd --join_acct_mgr https://grcpool.com/ username password&"
su user -c /usr/bin/boincmgr&
cd
}
# Stop BOINC.
boinc_stop()
{
killall boinc
}
case "$1" in
'start')
boinc_start
;;
'restart')
boinc_restart
;;
'stop')
boinc_stop
;;
*)
echo "usage $0 start|stop|restart"
esac
# Start BOINC.
boinc_start()
{
cd /home/user/.boinc_data
su user -c /usr/bin/boinc&
su user -c "/usr/bin/boinccmd --join_acct_mgr https://grcpool.com/ username password&"
su user -c /usr/bin/boincmgr&
cd
}
You either start boinc + boincmd OR boincmgr. You do not need both. boincmgr will automatically run boinc and connect to the configured account manager. boincmgr configs are $HOME/.BOINC Manager and /home/user/.boinc_data/*.xml (several for local settings, account manager login etc).
boinccmd is a CLI utility only sends commands to boinc to attach, display status, etc. It's not a server/daemon that remains in memory. see 'man boinccmd'.
And you should really start boinc (and boinc manager) with '--dir path' to give it the location of the current data directory. 'cd' there first is is a bit sloppy, to be blunt.
boinccmd is a CLI utility only sends commands to boinc to attach, display status, etc. It's not a server/daemon that remains in memory. see 'man boinccmd'.
Okay.
Quote:
And you should really start boinc (and boinc manager) with '--dir path' to give it the location of the current data directory. 'cd' there first is is a bit sloppy, to be blunt.
No, cd saves space/readability in contrast to '--dir-path'.
This is what I tried recently (to run boinc then a manager) but still get aforementioned error, which is apparently about boinc. Normally I'd use longer variable names but an 'exec' I added went almost to end of 1920 pixels and I forgot if I can put a slash in it and continue...
Code:
#!/bin/bash
# /etc/rc.d/rc.boinc: BOINC startup/control script for Slackware Linux
#
# Copyright 2022 Edward Koenig, Vancouver, WA, USA
# Modified by David Melik and copyright given to Edward Koening.
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BOINC_DIR=/home/user/.boinc_data # directory of boinc files
BOINC_BIN=boinc # name of the boinc binary
BOINC_USER=user # user that will run boinc process
BOINC_OPTIONS="--dir $BOINC_DIR --redirectio"
# "--dir $BOINC_DIR --daemon" will send logs syslog instead of
# stdoutdae.txt and stderrdae.txt
BOINC_CMD=boinccmd # name of boinc command/GUI tool/utility
# boinc GUI utility: boincmgr
AM_OPTIONS="--join_acct_mgr" # account manager options
AM="https://grcpool.com/" # URL of boinc account manager
AM_USER=user # boinc account manager user
# Recommendation: avoid plain-text password files on exposed/shared servers!
AM_PASS=password # boinc account manager password
boinc_status()
{
if ( ps -ef | grep "$BOINC_BIN$" > /dev/null 2>&1 ); then return 0
else return 3
fi
}
boinc_start()
{
boinc_status
if [ $? = 0 ]; then
echo "BOINC is already running"
exit 1
fi
if [ ! -d $BOINC_DIR ]; then
echo "ERROR: $BOINC_DIR does not exist"
exit 1
elif [ ! -x BOINC_BIN ]; then
echo "ERROR: BOINC_BIN does not exist or not executable"
exit 1
fi
echo "Starting BOINC client"
su - $BOINC_USER -c "cd $BOINC_DIR; exec /usr/bin/BOINC_BIN $BOINC_OPTIONS" &
# if [ "$BOINC_CMD" = "boinccmd" ] then su - $BOINC_USER -c "exec /usr/bin/$BOINC_CMD $AM_OPTIONS $AM $AM_USER $AM_PASS" &
# else su - $BOINC_USER -c "exec /usr/bin/$BOINC_CMD" &
# fi
}
boinc_stop()
{
echo "Stopping BOINC client"
# killall $BOINC_CMD
killall $BOINC_BIN
}
boinc_restart()
{
echo "Restarting BOINC client"
boinc_status
if [ $? = 0 ]; then
boinc_stop
sleep 3
boinc_start
else boinc_start
fi
}
case "$1" in
start)
boinc_start
exit 0
;;
stop)
boinc_stop
exit 0
;;
restart)
boinc_restart
exit 0
;;
status)
boinc_status
if [ $? = 0 ]; then echo "BOINC is running"
else echo "BOINC is not running"
fi
;;
*)
echo "Usage: $0 start|stop|restart|status"
exit 1
;;
esac
I wonder if without --redirectio you may be trying to write logs to a nonexisting file/location. Either that or boinc is having trouble with the '--dir path' since you are 'exec /usr/bin/...'
I wonder if without --redirectio you may be trying to write logs to a nonexisting file/location. Either that or boinc is having trouble with the '--dir path' since you are 'exec /usr/bin/...'
I accidentally removed redirectio and put it back in but same happens. I did 'upgradepkg --reinstall boinc-7.20.2-arm-2_SBo.txz' and looked at rc.boinc.new but that exec is in the original (not something I added).
[...]Either that or boinc is having trouble with the '--dir path' since you are 'exec /usr/bin/...'
Isn't that part of your script? I don't think I changed that part! Maybe you meant adding $BOINC_DIR to what I added (which I had commented out though and wasn't actually asking about at the time). When I updated that as I guess you meant, and copy out the commands, it works, but not on their own in the script yet; I'm merely getting the error running your script as-is (ignoring comments of stuff I want to do later) (if I copy & paste the commands it doesn't happen)... I wonder if something went wrong with the console character sets or the $PATH (includes '/etc/rc.d', '.' for current directory) that's doing this for rc scripts on two raspberry pis...
Code:
root@darwinheim:~# uname -a
Linux darwinheim 5.10.23-v7l-sarpi4 #5 SMP Fri Mar 19 18:18:05 GMT 2021 armv7l BCM2711 GNU/Linux
root@darwinheim:~# echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/etc:/etc/rc.d:/etc/init.d:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/games:/opt/notepadqq/bin:.:/usr/lib/qt5/bin
Those are Slackware-stable servers but boinc built fine on my Slackware-current desktop, but when I try to run boincmgr to administer the servers it says the below.
Code:
boincmgr: error while loading shared libraries: libwebkitgtk-1.0.so.0: cannot open shared object file: No such file or directory
Either that or boinc is having trouble with the '--dir path' since you are 'exec /usr/bin/...'
The problem is you 'exec /usr/bin/BOINC_BIN' instead of 'exec /usr/bin/$BOINC_BIN': broken for everyone; I don't know why you were talking about parts I commented out instead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.