mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Handle paths for multiple operating systems
This commit is contained in:
parent
3f92184b14
commit
6c5bc20344
@ -1621,7 +1621,7 @@ DEFAULT_SPM_OPTS = {
|
||||
# If set, spm_node_type will be either master or minion, but they should
|
||||
# NOT be a default
|
||||
'spm_node_type': '',
|
||||
'spm_share_dir': '/usr/share/salt/spm'
|
||||
'spm_share_dir': os.path.join(salt.syspaths.SHARE_DIR, 'spm'),
|
||||
# <---- Salt master settings overridden by SPM ----------------------
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,19 @@ if CONFIG_DIR is None:
|
||||
else:
|
||||
CONFIG_DIR = os.path.join(ROOT_DIR, 'etc', 'salt')
|
||||
|
||||
SHARE_DIR = __generated_syspaths.SHARE_DIR
|
||||
if SHARE_DIR is None:
|
||||
if __PLATFORM.startswith('win'):
|
||||
SHARE_DIR = os.path.join(ROOT_DIR, 'share')
|
||||
elif 'freebsd' in __PLATFORM:
|
||||
SHARE_DIR = os.path.join(ROOT_DIR, 'usr', 'local', 'share', 'salt')
|
||||
elif 'netbsd' in __PLATFORM:
|
||||
SHARE_DIR = os.path.join(ROOT_DIR, 'usr', 'share', 'salt')
|
||||
elif 'sunos5' in __PLATFORM:
|
||||
SHARE_DIR = os.path.join(ROOT_DIR, 'usr', 'share', 'salt')
|
||||
else:
|
||||
SHARE_DIR = os.path.join(ROOT_DIR, 'usr', 'share', 'salt')
|
||||
|
||||
CACHE_DIR = __generated_syspaths.CACHE_DIR
|
||||
if CACHE_DIR is None:
|
||||
CACHE_DIR = os.path.join(ROOT_DIR, 'var', 'cache', 'salt')
|
||||
|
@ -41,7 +41,7 @@ __opts__ = {
|
||||
'verbose': False,
|
||||
'cache': 'localfs',
|
||||
'spm_repo_dups': 'ignore',
|
||||
'spm_share_dir': '/usr/share/salt/spm',
|
||||
'spm_share_dir': os.path.join(_TMP_SPM, 'share'),
|
||||
}
|
||||
|
||||
_F1 = {
|
||||
|
Loading…
Reference in New Issue
Block a user