Changeset View
Changeset View
Standalone View
Standalone View
pykolab/setup/__init__.py
Show All 31 Lines | class Setup(object): | ||||
def __init__(self): | def __init__(self): | ||||
import components | import components | ||||
components.__init__() | components.__init__() | ||||
arg_num = 0 | arg_num = 0 | ||||
for arg in sys.argv[1:]: | for arg in sys.argv[1:]: | ||||
arg_num += 1 | arg_num += 1 | ||||
if not arg.startswith('-') and len(sys.argv) >= arg_num: | if not arg.startswith('-') and len(sys.argv) >= arg_num: | ||||
if components.components.has_key(sys.argv[arg_num].replace('-','_')): | if sys.argv[arg_num].replace('-','_') in components.components: | ||||
to_execute.append(sys.argv[arg_num].replace('-','_')) | to_execute.append(sys.argv[arg_num].replace('-','_')) | ||||
def run(self): | def run(self): | ||||
if os.path.isfile('/sys/fs/selinux/enforce'): | if os.path.isfile('/sys/fs/selinux/enforce'): | ||||
if os.access('/sys/fs/selinux/enforce', os.R_OK): | if os.access('/sys/fs/selinux/enforce', os.R_OK): | ||||
# Set a gentle default because strictly speaking, | # Set a gentle default because strictly speaking, | ||||
# setup won't fail (run-time does) | # setup won't fail (run-time does) | ||||
enforce = "0" | enforce = "0" | ||||
Show All 30 Lines |