Debian init.d script fails to start oned
|Assignee:||Jaime Melis||% Done:|
|Category:||Core & System|
|Target version:||Release 3.0|
I had a problem lately. On boot, oned was not started. I had to log in as oneadmin to start it. The reason was that the ONE_AUTH variable did not exist.
My setup is as follow :
- oneadmin has it's home in /var/lib/one
- /var/lib/one/.profile exports ONE_AUTH to the right value
The startup script does a "su oneadmin -s /bin/sh -c 'one start'".
The problem is that this will not load the .profile, and oned fails to start, complaining that :
You should have ONE_AUTH set the first time you start
OpenNebula as it is used to set the credentials for
the administrator user.
The small patch attached does a "su - oneadmin -s /bin/bash -c 'one start'"
This fixes the problem for me. However, I'm not sure it's the most elegant way to fix the problem, so I'm open to suggestions.