Merge pull request #9215 from uvsmtid/develop

Use uppercase for `OS` environment variable
This commit is contained in:
Thomas S Hatch 2013-12-13 12:57:22 -08:00
commit 627f358b57

View File

@ -146,8 +146,8 @@ def verify_files(files, user):
'''
Verify that the named files exist and are owned by the named user
'''
if 'os' in os.environ:
if os.environ['os'].startswith('Windows'):
if 'OS' in os.environ:
if os.environ['OS'].startswith('Windows'):
return True
import pwd # after confirming not running Windows
try:
@ -186,8 +186,8 @@ def verify_env(dirs, user, permissive=False, pki_dir=''):
Verify that the named directories are in place and that the environment
can shake the salt
'''
if 'os' in os.environ:
if os.environ['os'].startswith('Windows'):
if 'OS' in os.environ:
if os.environ['OS'].startswith('Windows'):
return True
import pwd # after confirming not running Windows
import grp
@ -285,8 +285,8 @@ def check_user(user):
'''
Check user and assign process uid/gid.
'''
if 'os' in os.environ:
if os.environ['os'].startswith('Windows'):
if 'OS' in os.environ:
if os.environ['OS'].startswith('Windows'):
return True
if user == getpass.getuser():
return True