anyone who knows "bash: $boincserverconfig: ambiguous redirect" ??? hlep me

Message boards : Server programs : anyone who knows "bash: $boincserverconfig: ambiguous redirect" ??? hlep me
Message board moderation

To post messages, you must log in.

AuthorMessage
smreodmlvl

Send message
Joined: 4 Aug 17
Posts: 4
Korea, South
Message 79992 - Posted: 4 Aug 2017, 6:06:26 UTC

https://wiki.debian.org/BOINC/ServerGuide/Initialisation

i install the boinc server on ubuntu 16.04LTS... i install the php5.6 than php5.

everything goings well but, when i enter the section 1.3.1 Create and config Boinc project,

step 1
echo "boincserverconfig=~/.boinc_test.conf" > ~/.boinc_test.conf
chmod 600 ~/.boinc_test.conf ----------------------------->ok

step 2
cat >> ~/.bashrc <<EOBASHRC
if [ -r "$boincserverconfig" ]; then
. $boincserverconfig
fi
EOBASHRC ------------------------------>ok

step 3
cat << EODBCONFIG >> $boincserverconfig
# name of the MySQL database
dbname=boinctest
# name of the MySQL user with access to above database
dbuser=boincadm
# password for write access to your project database
dbpasswd=MYSQLPASSWORDFORBOINCUSER
EODBCONFIG----------------------------> get " bash: $boincserverconfig: ambiguous redirect "

and then

step 4

# read config if available
[ -r "$boincserverconfig" ] && . $boincserverconfig
if [ -z "$dbuser" ]; then echo "Variable 'dbuser' not set";
elif ! echo "DROP USER '$dbuser'@'localhost'" | mysql -u root -p; then
echo "If the removal of the previous user fails because the user is not existing, then this does not matter. Other errors please investigate."
fi ----------------------------------> get dbuser is empty...


i don't know what i must do.. give me the light please T_T...
ID: 79992 · Report as offensive     Reply Quote
ChristianB
Volunteer moderator
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 305
Germany
Message 80000 - Posted: 4 Aug 2017, 14:30:46 UTC

If you want to use the settings stored in ~/.boinc_test.conf immediately you need to source the file to your active shell. What you did in step 2 will only source the file at login. So step 2.a would be:
source ~/.boinc_test.conf


Looking at it some more it seems step 2 is flawed. It is trying to pull itself out of the mud on its own hair. The variable $boincserverconfig is only available if ~/.boinc_test.conf was sourced but it is only sourced if $boincserverconfig is available. I send an email to the person that created the boinc-server-package and should know about that.
ID: 80000 · Report as offensive     Reply Quote
smoe

Send message
Joined: 20 Jul 09
Posts: 6
Germany
Message 80002 - Posted: 4 Aug 2017, 18:50:59 UTC - in response to Message 79992.  

Right. The variable $boincserverconfig names the file that hosts the server configuration. And that variable is set in that file. The idea behind that is that you could have several servers set up at different locations but the tutorial here just always knows where you have that configuration and can talk about that file by using that variable.

At some point in my life the tutorial went just fine. But that is some 2.5 years ago. And apparently I had executed the ". ~/.boinc_test.conf" after I had created it :) The step with the failing if just appends to the .bashrc . The $boincserverconfig variable is substituted when executing that command and the -r only tests if that file exists. Sorry for that. It is a bit confusing at a first sight. And many thanks for pointing out that there was this one line missing. I have added it to the wiki in the mean time.

Good luck downstream from here.
ID: 80002 · Report as offensive     Reply Quote
smreodmlvl

Send message
Joined: 4 Aug 17
Posts: 4
Korea, South
Message 80164 - Posted: 14 Aug 2017, 6:07:56 UTC - in response to Message 79992.  

i am sorry to late for your reply.
i did you told me, it worked!

i wish your everything goes well.
really thank you bro!
ID: 80164 · Report as offensive     Reply Quote
smreodmlvl

Send message
Joined: 4 Aug 17
Posts: 4
Korea, South
Message 80165 - Posted: 14 Aug 2017, 6:09:48 UTC - in response to Message 80164.  

ChristianB,

i am sorry to late for your reply.
i did you told me, it worked!

i wish your everything goes well.
really thank you bro!
ID: 80165 · Report as offensive     Reply Quote
smreodmlvl

Send message
Joined: 4 Aug 17
Posts: 4
Korea, South
Message 80166 - Posted: 14 Aug 2017, 6:15:28 UTC - in response to Message 80002.  

thank you smoe!
i could start my project by your dutorial!
ID: 80166 · Report as offensive     Reply Quote

Message boards : Server programs : anyone who knows "bash: $boincserverconfig: ambiguous redirect" ??? hlep me

Copyright © 2017 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.