Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make no-conf apply to isolate config as well #1175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions prerequisites.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,19 @@ def install_isolate():
os.path.join(USR_ROOT, "bin", "isolate"),
root, 0o4750, group=cmsuser_grp)

def install_isolate_conf():
"""This function installs the configuration files for isolate

"""
assert_root()
root = pwd.getpwnam("root")
try:
cmsuser_grp = grp.getgrnam(CMSUSER)
except:
print("[Error] The user %s doesn't exist yet" % CMSUSER)
print("[Error] You need to run the install command at least once")
exit(1)

print("===== Copying isolate config to /usr/local/etc/")
makedir(os.path.join(USR_ROOT, "etc"), root, 0o755)
copyfile(os.path.join(".", "isolate", "default.cf"),
Expand Down Expand Up @@ -313,6 +326,7 @@ def install():
old_umask = os.umask(0o000)

if not NO_CONF:
install_isolate_conf()
install_conf()

print("===== Creating directories")
Expand Down