[Spacewalk-list] Spacewalk-hostname-rename script broken on Centos7
Damien Daco
dacodamien at gmail.com
Thu Feb 18 18:13:16 UTC 2016
Hi all,
I had a problem similar to this one:
https://www.redhat.com/archives/spacewalk-list/2015-December/msg00046.html
Here's how I fixed the problem. Please bear with me, I'm a noob and this is
just a temp fix.
I'm hoping you guys will find a better way to implement this.
The spacewalk-hostname-rename script would fail with the following output:
Stopping rhn-satellite services ... OK
Testing DB connection ... FAILED
Your database isn't running.
Fix the problem and run /bin/spacewalk-hostname-rename again
My database is postgresql, but the script was looking at a wrong location:
if [ -x /etc/init.d/postgresql ]; then
DB_SERVICE="postgresql"
The thing is, my postgresql was NOT located at /etc/init.d/postgresql (I'm
guessing this is related to the switch to systemd)
I found the real location of my postgresql by running:
systemctl status postgresql
● postgresql.service - PostgreSQL database server
Loaded: loaded /usr/lib/systemd/system/postgresql.service
So I decided NOT to mess with the script (I'm a complete noob), but instead
I created a symbolic link to the actual file.
ln -s /usr/lib/systemd/system/postgresql.service /etc/init.d/postgresql
The script works now :)
My spacewalk host is running on CentOS 7 minimal.
Regards,
--
Damien Daco
www.dacodam.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20160218/5a092cc3/attachment.htm>
More information about the Spacewalk-list
mailing list