go
This commit is contained in:
parent
92018895eb
commit
b2a878ae6d
@ -1,4 +1,4 @@
|
|||||||
pikainstall (1.1.0-100pika1) pikauwu; urgency=medium
|
pikainstall (1.1.1-100pika1) pikauwu; urgency=medium
|
||||||
|
|
||||||
* Initial release.
|
* Initial release.
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import subprocess
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
version="1.1.0"
|
version="1.1.1"
|
||||||
dist="PikaOS 3"
|
dist="PikaOS 3"
|
||||||
image="/cdrom/casper/filesystem.squashfs"
|
image="/cdrom/casper/filesystem.squashfs"
|
||||||
|
|
||||||
@ -90,28 +90,28 @@ else:
|
|||||||
print("Root Encryption UUID: {}".format(root_uuid_encrypt))
|
print("Root Encryption UUID: {}".format(root_uuid_encrypt))
|
||||||
# Get Boot info
|
# Get Boot info
|
||||||
## Boot UUID
|
## Boot UUID
|
||||||
boot_uuid_command= subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.root + "/boot" , stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
boot_uuid_command= subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.root[0] + "/boot" , stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
## Print Boot
|
## Print Boot
|
||||||
boot_uuid = boot_uuid_command.stdout.readline().decode("utf-8").strip()
|
boot_uuid = boot_uuid_command.stdout.readline().decode("utf-8").strip()
|
||||||
print("\nBoot UUID: {}".format(boot_uuid))
|
print("\nBoot UUID: {}".format(boot_uuid))
|
||||||
# Get EFI info
|
# Get EFI info
|
||||||
## EFI UUID
|
## EFI UUID
|
||||||
efi_uuid_command= subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.root + "/boot/efi", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
efi_uuid_command= subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.root[0] + "/boot/efi", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
efi_uuid = efi_uuid_command.stdout.readline().decode("utf-8").strip()
|
efi_uuid = efi_uuid_command.stdout.readline().decode("utf-8").strip()
|
||||||
## Print EFI Info
|
## Print EFI Info
|
||||||
print("\nEFI UUID: {}".format(efi_uuid))
|
print("\nEFI UUID: {}".format(efi_uuid))
|
||||||
|
|
||||||
## Home UUID
|
## Home UUID
|
||||||
home_uuid_command = subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.root + "/home", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
home_uuid_command = subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'uuid'] + args.root[0] + "/home", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
home_uuid = home_uuid_command.stdout.readline().decode("utf-8").strip()
|
home_uuid = home_uuid_command.stdout.readline().decode("utf-8").strip()
|
||||||
|
|
||||||
# Get Home info is exists
|
# Get Home info is exists
|
||||||
if root_uuid != home_uuid:
|
if root_uuid != home_uuid:
|
||||||
## Home Encryption Partition
|
## Home Encryption Partition
|
||||||
home_part_encrypt_command = subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'encrypt-part'] + args.root + "/home", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
home_part_encrypt_command = subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'encrypt-part'] + args.root[0] + "/home", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
home_part_encrypt = home_part_encrypt_command.stdout.readline().decode("utf-8").strip()
|
home_part_encrypt = home_part_encrypt_command.stdout.readline().decode("utf-8").strip()
|
||||||
## Home Encryption UUID
|
## Home Encryption UUID
|
||||||
home_uuid_encrypt_command = subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'encrypt-uuid'] + args.root + "/home", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
home_uuid_encrypt_command = subprocess.Popen(['/usr/lib/pika/pikainstall/partition-helper.sh', 'encrypt-uuid'] + args.root[0] + "/home", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
home_uuid_encrypt = home_uuid_encrypt_command.stdout.readline().decode("utf-8").strip()
|
home_uuid_encrypt = home_uuid_encrypt_command.stdout.readline().decode("utf-8").strip()
|
||||||
print("\nHome UUID: {}".format(home_uuid))
|
print("\nHome UUID: {}".format(home_uuid))
|
||||||
if home_part_encrypt == "luks_none":
|
if home_part_encrypt == "luks_none":
|
||||||
@ -155,21 +155,21 @@ elif root_uuid != home_uuid:
|
|||||||
# With All Checks Clear and info gathered let's start installing
|
# With All Checks Clear and info gathered let's start installing
|
||||||
|
|
||||||
## extract the squashfs image to root from casper
|
## extract the squashfs image to root from casper
|
||||||
squashfs_cmd = ['unsquashfs', '-f', '-d', listToString(args.root), image]
|
squashfs_cmd = ['unsquashfs', '-f', '-d', listToString(args.root[0]), image]
|
||||||
subprocess.run(squashfs_cmd)
|
subprocess.run(squashfs_cmd)
|
||||||
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-image.txt'])
|
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-image.txt'])
|
||||||
|
|
||||||
## Enable bls_boot on boot partiton
|
## Enable bls_boot on boot partiton
|
||||||
boot_flag_cmd = ['/usr/lib/pika/pikainstall/partition-helper.sh', 'flag', listToString(args.root + "/boot" ), 'bls_boot', 'on']
|
boot_flag_cmd = ['/usr/lib/pika/pikainstall/partition-helper.sh', 'flag', listToString(args.root[0] + "/boot" ), 'bls_boot', 'on']
|
||||||
subprocess.run(boot_flag_cmd)
|
subprocess.run(boot_flag_cmd)
|
||||||
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-flag1.txt'])
|
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-flag1.txt'])
|
||||||
|
|
||||||
## Enable esp on EFI partiton
|
## Enable esp on EFI partiton
|
||||||
efi_flag_cmd = ['/usr/lib/pika/pikainstall/partition-helper.sh', 'flag', listToString(args.root + "/boot/efi"), 'esp', 'on']
|
efi_flag_cmd = ['/usr/lib/pika/pikainstall/partition-helper.sh', 'flag', listToString(args.root[0] + "/boot/efi"), 'esp', 'on']
|
||||||
subprocess.run(efi_flag_cmd)
|
subprocess.run(efi_flag_cmd)
|
||||||
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-flag2.txt'])
|
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-flag2.txt'])
|
||||||
|
|
||||||
CHROOT_PATH = listToString(args.root)
|
CHROOT_PATH = listToString(args.root[0])
|
||||||
|
|
||||||
# Write crypttab script if system has encryption
|
# Write crypttab script if system has encryption
|
||||||
if root_part_encrypt != "luks_none":
|
if root_part_encrypt != "luks_none":
|
||||||
@ -185,7 +185,7 @@ if root_part_encrypt != "luks_none":
|
|||||||
file.write(albius_crypttab_root_file)
|
file.write(albius_crypttab_root_file)
|
||||||
|
|
||||||
# Write crypttab script if system has encryption
|
# Write crypttab script if system has encryption
|
||||||
if args.root + "/home" is not None:
|
if args.root[0] + "/home" is not None:
|
||||||
if home_part_encrypt != "luks_none":
|
if home_part_encrypt != "luks_none":
|
||||||
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-crypt.txt'])
|
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-crypt.txt'])
|
||||||
CRYPTTAB_FILE_PATH = '/var/albius-crypttab.sh'
|
CRYPTTAB_FILE_PATH = '/var/albius-crypttab.sh'
|
||||||
@ -229,7 +229,7 @@ with open(CHROOT_REFIND_FILE_PATH, "w") as file:
|
|||||||
|
|
||||||
## Run pika-install-script
|
## Run pika-install-script
|
||||||
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-post.txt'])
|
subprocess.run(['touch', '/tmp/pika-installer-gtk4-status-post.txt'])
|
||||||
bind_dev_cmd = ['/usr/lib/pika/pikainstall/pika-install-host.sh', listToString(args.root)]
|
bind_dev_cmd = ['/usr/lib/pika/pikainstall/pika-install-host.sh', listToString(args.root[0])]
|
||||||
subprocess.run(bind_dev_cmd)
|
subprocess.run(bind_dev_cmd)
|
||||||
|
|
||||||
print("System installed!")
|
print("System installed!")
|
||||||
|
Loading…
Reference in New Issue
Block a user