Skip to content

Commit ccf69c7

Browse files
committed
feat: Make no-conf apply to isolate config as well
1 parent 98cf097 commit ccf69c7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

prerequisites.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,19 @@ def install_isolate():
224224
os.path.join(USR_ROOT, "bin", "isolate"),
225225
root, 0o4750, group=cmsuser_grp)
226226

227+
def install_isolate_conf():
228+
"""This function installs the configuration files for isolate
229+
230+
"""
231+
assert_root()
232+
root = pwd.getpwnam("root")
233+
try:
234+
cmsuser_grp = grp.getgrnam(CMSUSER)
235+
except:
236+
print("[Error] The user %s doesn't exist yet" % CMSUSER)
237+
print("[Error] You need to run the install command at least once")
238+
exit(1)
239+
227240
print("===== Copying isolate config to /usr/local/etc/")
228241
makedir(os.path.join(USR_ROOT, "etc"), root, 0o755)
229242
copyfile(os.path.join(".", "isolate", "default.cf"),
@@ -313,6 +326,7 @@ def install():
313326
old_umask = os.umask(0o000)
314327

315328
if not NO_CONF:
329+
install_isolate_conf()
316330
install_conf()
317331

318332
print("===== Creating directories")

0 commit comments

Comments
 (0)