Posts by Glenn C

1) Message boards : Questions and problems : Mint linux 21 fresh install boinc won't start (Message 109656)
Posted 18 Aug 2022 by Glenn C
Post:
Hi,
I've not used Mint 21 yet but I had problems with Mint 20.3 getting the packaged version of boinc client (7.16.6) to run correctly.

The problem was that the systemctl file supplied for the client doesn't match the way it was started with the /etc/init.d/boinc-client scripts causing various things not to work correctly. I created a custom systemctl file for the client to solve it.

I posted more details on the forums here https://boinc.berkeley.edu/forum_thread.php?id=14755 in case it proved useful for someone else. Unless the boinc package has been updated, I suspect you'll see the same on Mint 21.

Ideally the default systemctl for the client needs improvements.

HTH.

Glenn
2) Message boards : Questions and problems : boinc client arguments at boot, systemctl issues (Message 109610)
Posted 15 Aug 2022 by Glenn C
Post:
Hi,

I have a new install of Linux Mint 20.3 with boinc 7.16.6. I've had issues with running the client at boot with appropriate arguments. I have something that now works but I'd be interested in comments on whether I'm going about it the right way.

By default, the client starts at boot but runs with no arguments, just /usr/bin/boinc, but I would like the client to start with arguments at boot time:

/usr/bin/boinc --allow_remote_gui_rpc --dir /work/boinc

which is how the client starts on another system of mine that doesn't use systemctl. The default boot config comes from /lib/systemd/system/boinc-client.service and contains the following key line:

ExecStart=/usr/bin/boinc

note no arguments. I'd be interested in why the default for systemctl was chosen to be different to the way /etc/init.d/boinc-client starts the client.

So I first looked at /etc/init.d/boinc-client which has this line near the top:

. /lib/lsb/init-functions

which hands over execution to systemctl and then exits at this point in /etc/init.d/boinc-client (confusing). That means /etc/default/boinc-client is not read and /etc/init.d/boinc-client will not start the client with the default arguments specified in that file.

However, adding the following variable to /etc/init.d/boinc-client causes the systemctl start to be bypassed and /etc/init.d/boinc-client will function normally:

SYSTEMCTL_SKIP_REDIRECT=yes
. /lib/lsb/init-functions

So at least I had a way to start the client with my required command line arguments. Ideally though this should be handled with systemctl (which I'm not so familiar with).

After some reading, I created a service override in /etc/systemd/system/boinc-client.service.d/override.conf
[Service]
WorkingDirectory=/work/boinc-client
ReadWritePaths=-/work/boinc-client -/etc/boinc-client
ExecStart=
ExecStart=/usr/bin/boinc --allow_remote_gui_rpc --dir /work/boinc-client


Note the first ExecStart= line is needed to clear the ExecStart default value in /lib/systemd/system/boinc-client.service. Otherwise this generates an error that only one use of ExecStart is allowed with Type=simple.

Then run:
sudo systemctl daemon-reload
sudo systemctl start boinc-client
systemctl status boinc-client


All seems to be ok at this point and I've checked it starts correctly on boot.

My question is whether this is the correct way of setting up arguments for the boinc-client, similar to the way /etc/init.d/boinc-client would function? Systemctl has an EnvironmentFile option that could possibly be used to setup variables that could be used in the command (see https://superuser.com/questions/728951/systemd-giving-my-service-multiple-arguments) in the same way of /etc/default/boinc-client but I'm not sure I need that (yet, anyway).

Comments welcome and anyone shedding light on why systemctl start at boot doesn't use the arguments that /etc /init.d/boinc-client does?

Thanks, Glenn




Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.