Message boards : Questions and problems : optional arguments not being passed to boinc client in ubuntu
Message board moderation
Author | Message |
---|---|
![]() ![]() Send message Joined: 27 Jun 08 Posts: 642 ![]() |
Making some progress: I now know that I really don't know much about Linux and how startup scripts work. From a discussion here months ago I was told that /systemd/system,boinc-client.service is what really starts boinc that script has the following [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] Type=simple ProtectHome=true PrivateTmp=true ProtectSystem=strict ProtectControlGroups=true ReadWritePaths=-/var/lib/boinc -/etc/boinc-client Nice=10 User=boinc WorkingDirectory=/var/lib/boinc ExecStart=/usr/bin/boinc ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f lockfile IOSchedulingClass=idle # The following options prevent setuid root as they imply NoNewPrivileges=true # Since Atlas requires setuid root, they break Atlas # In order to improve security, if you're not using Atlas, # Add these options to the [Service] section of an override file using # sudo systemctl edit boinc-client.service #NoNewPrivileges=true #ProtectKernelModules=true #ProtectKernelTunables=true #RestrictRealtime=true guess what? that service script has no place for an argument. As it is, there is no way to pass any arguments using /etc/default/boinc-client or even /etc/init.d/boinc-client !!! at least when using ppa:costamagnagianfranco which is where I get anything later than versoin 7.9 maybe another ppa has a better solution??? IMHO of course [EDIT] I am guessing I could edit the file and add the arguments behind the /usr/bin/boinc if so, then obviously that start script I have been using does not do what it says it can do. A suggestion by Richard was to just use systemcrl to start boinc maybe that is all that init.d script does and nothing else. [EDIT2] After adding my boinc optional argument behind ExecStart=/usr/bin/boinc I had to run systemctl daemon-reload before the client would start with the new argument. A real PITA. However, it was nice of the OS to advise me to use that reload command. Saved googleing for the problem |
Send message Joined: 5 Oct 06 Posts: 5149 ![]() |
A suggestion by Richard was to just use systemcrl to start boincAll I can say is that the systemctl call I posted 'works for me' on a recent Ubuntu-based installation: it starts and stops the client cleanly when I need to change things, and don't want to bother rebooting the whole machine. Why are you trying to pass arguments to the BOINC client, anyway? |
![]() ![]() Send message Joined: 27 Jun 08 Posts: 642 ![]() |
I am fine-tuning a special "mod" of the client for super-secret event and only Juan BFP and Keith Myers know what I am up to. ![]() |
Send message Joined: 5 Oct 06 Posts: 5149 ![]() |
Fair enough. I've run several of Juan's mods - that's my main reason for stopping and starting BOINC. So systemctl works in that context, too. |
![]() ![]() Send message Joined: 27 Jun 08 Posts: 642 ![]() |
Discovered how to pass command line arguments to boinc using the existing ubuntu "default" way. A mod to the service is required First: the /etc/init.d/boinc-client <start | restart | stop > runs the service but cannot pass arguments. According to the bible arguments need to be in an environmental file. That file is not identified in the service and possibly that init.d file is going to be depreciated. in /lib/systemd/system/boinc-client.service where WorkingDirectory=/var/lib/boinc ExecStart=/usr/bin/boinc ExecStop=/usr/bin/boinccmd --quit add the following WorkingDirectory=/var/lib/boinc ExecStart=/usr/bin/boinc $BOINC_OPTS EnvironmentFile=/etc/default/boinc-client ExecStop=/usr/bin/boinccmd --quit Where that "default" file has the following # Here you can specify additional options to pass to the BOINC core client. # Type 'boinc --help' or 'man boinc' for a full summary of allowed options. #BOINC_OPTS="--allow_remote_gui_rpc" BOINC_OPTS="" # Scheduling options add your optional arguments at that BOINC_OPTS save service changes with "systemctl daemon-reload" then start client with sudo systemctl start boinc-client If you made a mistake in the arguments, use "journalctl -xe" to see what systemctl did Not sure who decides how Boinc is installed in Linux, but I think this change needs to be incorporated in any Linux releases. [EDIT] I do not see any of this code at the Boinc GitHub so I assume it is controlled elsewhere. I can make a suggestion about the change there but it might just clutter up the "issue" database. ----just looked over there and other people have requested changes to the service so I will add this in. |
![]() ![]() Send message Joined: 17 Nov 16 Posts: 906 ![]() |
at least when using ppa:costamagnagianfranco which is where I get anything later than versoin 7.9 Confused. From Gianfranco's ppa, I see BOINC 7.16.3 listed for Ubuntu 18.04, 19.04 and 19.10. You should be getting that version. If you are still getting 7.9.3 you are pulling BOINC from the distro and not the ppa. You need to update your sources list. Check the Software Sources list and make sure you see the ppa listed. You might have to provide the public key for the ppa. Should have all been handled by the add-apt-repository unless you still haven't issued the apt update. https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/boinc |
Copyright © 2025 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.