Skip to content

Commit

Permalink
Test basesystem fix (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Coopydood <[email protected]>
  • Loading branch information
eversiege and Coopydood authored Oct 20, 2024
1 parent d8651a7 commit cf81c4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ def fts():
if "APC-RUN" in apFileM:
VALID_FILE = 1

if "#-drive id=BaseSystem,if=none,file=\"$REPO_PATH/BaseSystem.img\",format=raw" not in apFileM and "-drive id=BaseSystem,if=none,file=\"$REPO_PATH/BaseSystem.img\",format=raw" in apFileM and "HDD_PATH=\"/dev/disk/" not in apFileM:
if "#-drive id=BaseSystem,if=none,file=\"$VM_PATH/BaseSystem.img\",format=raw" not in apFileM and "-drive id=BaseSystem,if=none,file=\"$VM_PATH/BaseSystem.img\",format=raw" in apFileM and "HDD_PATH=\"/dev/disk/" not in apFileM:
if os.path.exists("./blobs/user/USR_HDD_PATH.apb"):
hddPath = open("./blobs/user/USR_HDD_PATH.apb")
hddPath = hddPath.read()
hddPath = hddPath.replace("$REPO_PATH",os.path.realpath(os.curdir))
hddPath = hddPath.replace("$VM_PATH",os.path.realpath(os.curdir))
if (os.path.getsize(hddPath)) > 22177079296 and not os.path.exists("./blobs/user/.noBaseSystemReminder"):
baseSystemNotifArmed = True
#REQUIRES_SUDO = 1 # UNCOMMENT FOR DEBUGGING
Expand Down Expand Up @@ -273,7 +273,7 @@ def baseSystemAlert():
if detectChoice5 == "1":
with open("./"+apFilePath,"r") as apFile:
apFileM = apFile.read()
apFileM = apFileM.replace("-drive id=BaseSystem,if=none,file=\"$REPO_PATH/BaseSystem.img\",format=raw\n-device ide-hd,bus=sata.4,drive=BaseSystem","#-drive id=BaseSystem,if=none,file=\"$REPO_PATH/BaseSystem.img\",format=raw\n#-device ide-hd,bus=sata.4,drive=BaseSystem")
apFileM = apFileM.replace("-drive id=BaseSystem,if=none,file=\"$VM_PATH/BaseSystem.img\",format=raw\n-device ide-hd,bus=sata.4,drive=BaseSystem","#-drive id=BaseSystem,if=none,file=\"$VM_PATH/BaseSystem.img\",format=raw\n#-device ide-hd,bus=sata.4,drive=BaseSystem")
apFile.close()
time.sleep(1)
with open("./"+apFilePath,"w") as apFile:
Expand Down

0 comments on commit cf81c4a

Please sign in to comment.