From 4038e43c68c73c27947f9f0944f4b37461e05981 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Fri, 20 Oct 2023 18:27:56 +0300 Subject: [PATCH] fix file writers maybe? --- pikainstall/debian/changelog | 2 +- .../pika/pikainstall/pika-install-chroot.sh | 16 ++++++++-------- .../usr/lib/pika/pikainstall/pikainstall | 18 ++++++++++++------ 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/pikainstall/debian/changelog b/pikainstall/debian/changelog index 2a675d4..98c6ff1 100644 --- a/pikainstall/debian/changelog +++ b/pikainstall/debian/changelog @@ -1,4 +1,4 @@ -pikainstall (1.0.1-100pika1) pikauwu; urgency=medium +pikainstall (1.0.2-100pika1) pikauwu; urgency=medium * Initial release. diff --git a/pikainstall/usr/lib/pika/pikainstall/pika-install-chroot.sh b/pikainstall/usr/lib/pika/pikainstall/pika-install-chroot.sh index 78bb0d7..2fff622 100755 --- a/pikainstall/usr/lib/pika/pikainstall/pika-install-chroot.sh +++ b/pikainstall/usr/lib/pika/pikainstall/pika-install-chroot.sh @@ -1,18 +1,18 @@ #! /bin/bash apt remove casper -y apt autoremove -y -if [ -f /tmp/albius-crypttab-root.sh ] +if [ -f /var/albius-crypttab-root.sh ] then - chmod +x /tmp/albius-crypttab-root.sh - /tmp/albius-crypttab-root.sh + chmod +x /var/albius-crypttab-root.sh + /var/albius-crypttab-root.sh fi -if [ -f /tmp/albius-crypttab.sh ] +if [ -f /var/albius-crypttab.sh ] then - chmod +x /tmp/albius-crypttab.sh - /tmp/albius-crypttab.sh + chmod +x /var/albius-crypttab.sh + /var/albius-crypttab.sh fi -chmod +x /tmp/albius-refind_linux.sh -/tmp/albius-refind_linux.sh +chmod +x /var/albius-refind_linux.sh +/var/albius-refind_linux.sh refind-install apt install -y /var/cache/apt/archives/pika-refind-theme*.deb apt install -y /var/cache/apt/archives/booster*.deb diff --git a/pikainstall/usr/lib/pika/pikainstall/pikainstall b/pikainstall/usr/lib/pika/pikainstall/pikainstall index 3869b23..b8a7713 100755 --- a/pikainstall/usr/lib/pika/pikainstall/pikainstall +++ b/pikainstall/usr/lib/pika/pikainstall/pikainstall @@ -6,7 +6,7 @@ import subprocess import os # Version -version="1.0.1" +version="1.0.2" dist="PikaOS 3" image="/cdrom/casper/filesystem.squashfs" @@ -136,8 +136,10 @@ CHROOT_PATH = listToString(args.root) # Write crypttab script if system has encryption if root_encrypt != "luks_none": - CRYPTTAB_ROOT_FILE_PATH = '/tmp/albius-crypttab-root.sh' + CRYPTTAB_ROOT_FILE_PATH = '/var/albius-crypttab-root.sh' CHROOT_CRYPTTAB_ROOT_FILE_PATH = os.path.join(CHROOT_PATH,CRYPTTAB_ROOT_FILE_PATH) + print("writing to:") + print(CHROOT_CRYPTTAB_ROOT_FILE_PATH) with open(CHROOT_CRYPTTAB_ROOT_FILE_PATH, "w") as file: albius_crypttab_root_file = _CRYPTTAB_ROOT_SETUP_FILE.format( ROOT_PART_UUID=root_uuid, @@ -147,8 +149,10 @@ if root_encrypt != "luks_none": # Write crypttab script if system has encryption if args.home is not None: if home_encrypt != "luks_none": - CRYPTTAB_FILE_PATH = '/tmp/albius-crypttab.sh' - CHROOT_CRYPTTAB_FILE_PATH =os .path.join(CHROOT_PATH,CRYPTTAB_FILE_PATH) + CRYPTTAB_FILE_PATH = '/var/albius-crypttab.sh' + CHROOT_CRYPTTAB_FILE_PATH = os.path.join(CHROOT_PATH,CRYPTTAB_FILE_PATH) + print("writing to:") + print(CHROOT_CRYPTTAB_FILE_PATH) with open(CHROOT_CRYPTTAB_FILE_PATH, "w") as file: albius_crypttab_file = _CRYPTTAB_SETUP_FILE.format( HOME_PART_UUID=home_uuid, @@ -157,8 +161,10 @@ if args.home is not None: file.write(albius_crypttab_file) # Write refind script if system has encryption -REFIND_FILE_PATH = '/tmp/albius-refind_linux.sh' -CHROOT_REFIND_FILE_PATH=os.path.join(dir,file) +REFIND_FILE_PATH = '/var/albius-refind_linux.sh' +CHROOT_REFIND_FILE_PATH = os.path.join(CHROOT_PATH,REFIND_FILE_PATH) +print("writing to:") +print(CHROOT_REFIND_FILE_PATH) with open(CHROOT_REFIND_FILE_PATH, "w") as file: refind_crypttab_file = _REFIND_SETUP_FILE.format( ROOT_PART_UUID=root_uuid,