refs #404 fix fstab adding noauto amd checking if line exits
parent
b397c7aaa9
commit
f7daf2f5f9
|
@ -903,19 +903,21 @@ except Exception as e:
|
|||
exit(1)
|
||||
|
||||
try:
|
||||
logger.info("Configuring package repositories.")
|
||||
if REMOTE == 1:
|
||||
downloadCode(GIT_REPO)
|
||||
else:
|
||||
if not os.path.exists(f"{WORKDIR}/ogboot"):
|
||||
if not os.path.exists(WORKDIR):
|
||||
os.makedirs(WORKDIR, mode=0o775, exist_ok=True)
|
||||
logger.info(f"{WORKDIR}/ogboot directory created")
|
||||
logger.info(f"ogBoot directory not found, creating a symbolic link to the code directory")
|
||||
os.symlink(os.path.dirname(PROGRAM_DIR), f"{WORKDIR}/ogboot")
|
||||
logger.info("Configuring package repositories.")
|
||||
if REMOTE == 1:
|
||||
downloadCode(GIT_REPO)
|
||||
else:
|
||||
if os.path.exists(f"{WORKDIR}/ogboot"):
|
||||
os.remove(f"{WORKDIR}/ogboot")
|
||||
logger.info(f"Existing symbolic link to ogBoot directory removed.")
|
||||
if not os.path.exists(WORKDIR):
|
||||
os.makedirs(WORKDIR, mode=0o775, exist_ok=True)
|
||||
logger.info(f"{WORKDIR}/ogboot directory created")
|
||||
logger.info(f"Creating a symbolic link to the code directory")
|
||||
os.symlink(os.path.dirname(PROGRAM_DIR), f"{WORKDIR}/ogboot")
|
||||
except Exception as e:
|
||||
logger.error(f"Error configuring package repositories: {e}")
|
||||
exit(1)
|
||||
logger.error(f"Error configuring package repositories: {e}")
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
add_sudoers_permissions()
|
||||
|
|
Loading…
Reference in New Issue