[omd-devel] Create site in sylinked path fails - suggested fix

Oliver O'Boyle ooboyle at atlific.com
Tue Jun 23 17:24:43 CEST 2015


Hello,

I recently tried to create an OMD site in a previously symlinked path. The procedure failed due to broken symlinks. The broken symlinks occur because the relative path of '../../versions/<OMD_VERSION>' is used during the creation process. The create_version_symlink function in /usr/bin/omd can be changed to use the /omd/versions path instead, as such:

ORIGINAL:
def create_version_symlink(sitename, version):
    linkname = site_dir(sitename) + "/version"
    if os.path.exists(linkname):
        os.remove(linkname)
    os.symlink("../../versions/%s" % OMD_VERSION, linkname)

LINE 415 CHANGED TO:

def create_version_symlink(sitename, version):
    linkname = site_dir(sitename) + "/version"
    if os.path.exists(linkname):
        os.remove(linkname)
    os.symlink("/omd/versions/%s" % OMD_VERSION, linkname)   <--line 415

I've made this change and tested the creation of new sites. It seems to work flawlessly.

Is it possible to make this change (or something similar that allows for sites to be created in a symlinked path) to the distribution?

Regards,
Oliver

_________________________________

Oliver O'Boyle
Director, IT * Atlific Hotels

250 Saint-Antoine W., Suite 400 Montreal, Quebec H2Y 0A3
T: 514.509.5545   C: 514.608.8533   F: 514.509.5498

ooboyle at atlific.com<mailto:ooboyle at atlific.com>      www.atlific.com<http://www.atlific.com/>
_________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/omd-devel/attachments/20150623/8dbc2798/attachment.html>


More information about the omd-devel mailing list