Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Search for libexec binaries in /usr/lib/xcp/lib as well as /opt/xenso…
Browse files Browse the repository at this point in the history
…urce/libexec
  • Loading branch information
jamesbulpin authored and andyhhp committed Jan 24, 2014
1 parent 422cbf1 commit 0867837
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions XSConsoleConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def __init__(self):
if os.path.exists(path):
self.helperdir = path
break

self.libexecdir = ''
for path in ["/usr/lib/xcp/lib", "/opt/xensource/libexec"]:
if os.path.exists(path):
self.libexecdir = path
break

@classmethod
def Inst(cls):
Expand Down Expand Up @@ -92,6 +98,9 @@ def XECLIPath(self):
def HelperPath(self):
return self.helperdir

def LibexecPath(self):
return self.libexecdir

# Import a more specific configuration if available
if os.path.isfile(sys.path[0]+'/XSConsoleConfigOEM.py'):
import XSConsoleConfigOEM
Expand Down
2 changes: 1 addition & 1 deletion plugins-base/XSFeatureDRSchedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def HandleMethodChoice(self, inChoice):
pass
if inChoice != 'never':
try:
os.symlink("/opt/xensource/libexec/backup-metadata-cron", self.cronPath(inChoice))
os.symlink("%s/backup-metadata-cron" % (Config.Inst().LibexecPath()), self.cronPath(inChoice))
Layout.Inst().PushDialogue(InfoDialogue(Lang("Metadata Backup Schedule successfully changed to occur ") + inChoice + "."))
except:
XSLogFailure('Failed to create metadata schedule link')
Expand Down
2 changes: 1 addition & 1 deletion plugins-base/XSFeatureNetworkReset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from XSConsoleStandard import *

pool_conf = '%s/pool.conf' % (Config.Inst().XCPConfigDir())
interface_reconfigure = '/opt/xensource/libexec/interface-reconfigure'
interface_reconfigure = '%s/interface-reconfigure' % (Config.Inst().LibexecPath())
inventory_file = '/etc/xensource-inventory'
management_conf = '/etc/firstboot.d/data/management.conf'
network_reset = '/tmp/network-reset'
Expand Down

0 comments on commit 0867837

Please sign in to comment.