From 4a134201f12b70c02746c1b8d7195f18623bca22 Mon Sep 17 00:00:00 2001 From: Zedeldi <66186954+Zedeldi@users.noreply.github.com> Date: Tue, 4 Apr 2023 21:29:51 +0100 Subject: [PATCH] Replace tabs with spaces in heredoc to pipe correctly --- monocleOS_Installer.sh | 8 ++++---- pkg/PKGBUILD | 6 +++--- pkg/initMonocle | 2 +- pkg/monocleOS | 20 +++++++++++--------- pkg/monocleOS-recovery | 8 ++++---- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/monocleOS_Installer.sh b/monocleOS_Installer.sh index 1ae1e11..144b9d7 100755 --- a/monocleOS_Installer.sh +++ b/monocleOS_Installer.sh @@ -344,12 +344,12 @@ locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf echo "KEYMAP=$vconsole" > /etc/vconsole.conf echo "$hostname" > /etc/hostname -echo "127.0.0.1 localhost" >> /etc/hosts -echo "::1 localhost" >> /etc/hosts -echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts +echo "127.0.0.1 localhost" >> /etc/hosts +echo "::1 localhost" >> /etc/hosts +echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts echo "$issue" > /etc/issue echo "" >> /etc/issue -echo "monocleOS UUID=$luksUUID /priv/defaultKey.bin luks" >> /etc/crypttab.initramfs +echo "monocleOS UUID=$luksUUID /priv/defaultKey.bin luks" >> /etc/crypttab.initramfs echo '[multilib] Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf pacman -Sy diff --git a/pkg/PKGBUILD b/pkg/PKGBUILD index cd8499d..cc55228 100644 --- a/pkg/PKGBUILD +++ b/pkg/PKGBUILD @@ -15,10 +15,10 @@ conflicts=('monocleos' 'xlunch-git') source=('xlunch_precompiled' 'xlunch_menu_precompiled' 'monocleOS' 'monocleOS-recovery' 'update' 'initMonocle' 'toggleTouchpad.sh' 'entries.dsv.skel' 'dunstrc' 'i3.conf' 'polybar.conf' 'polybar.sh' 'bash_profile' 'xinitrc' 'icons.default' 'gtkSettings.ini' 'gtkrc' 'Trolltech.conf' 'pam_environment' 'autologin.conf' 'grubUpgrade.hook' 'mirrorUpgrade.hook' 'themeUpgrade.hook' 'nvidia.hook' '40-libinput.conf' '50-lockdown.conf' 'clamd.conf' 'nsswitch.conf' 'os-release' 'grub' 'launcher.conf' 'application-wrapper' 'tips-service' 'tips-service.conf' 'automatic-update.service' 'automatic-update.timer' 'clamav-scan.service' 'clamav-scan.timer' 'onboard.theme') sha256sums=('4e578283544c131cc3089eddda912d7013dda7ea49b1375fe40b73fb9ffd17d9' 'd8c2ac853a530e6e049f12da497de4232db8887633748158944bd2f6b601308c' - 'bc302f3568a93bc2a313d1ad1790ec36f39a7e6a8238f4de3740b6be6ab44489' - '1ab7637ea57a63441a2840b28d32a38da2bcd650b9215c7cdec5f274f4c7eb5e' + 'ae6698a0f689f2910ccaba258b44e382115697d525605d376921dba032d96996' + '514623370b3efc5460b29c2e09457077c5284330fb174d840df8848f1418f650' '0fdccce507fcefba629561625eb7172e5beb7e4576419c049c499e5960d5c874' - 'f4657a5a0b263f5acba618cad7cf128f8c863e3144baa5b60ca36ac874fa5c2b' + '3a04bf764972f6d29a6908498a2fae0cb9d3ece66a248c79cea447491c0a0a3f' 'd1ad17c0b9c5848c16c81ceadc6883298c0841a3bbd28ab1d783eb01ea4470a7' 'b25e3f34fb820e3852770b975c5f308ebc46b70d89e830da778ca7653f028677' 'adc0d2a470f0f299a0aea22b0d69cd3faf3272e11b202db88b9e27037987bfe9' diff --git a/pkg/initMonocle b/pkg/initMonocle index c3dddb0..e0cab6c 100755 --- a/pkg/initMonocle +++ b/pkg/initMonocle @@ -76,7 +76,7 @@ echo "$1:$password" | chpasswd || { zenity --width 200 --error --title="Adding P # Assuming password change worked echo -e "$password" | cryptsetup luksChangeKey -q /dev/disk/by-uuid/$luksUUID --key-file=/priv/defaultKey.bin --key-slot 0 || { zenity --width 200 --error --title="Something Unexpected Happened" --text="Something went wrong. Do NOT poweroff your PC.\nPlease contact your system administrator."; exit 1; } echo "30"; sleep 1 -echo "# Adding password..."; echo "monocleOS UUID=$luksUUID none luks" > /etc/crypttab.initramfs +echo "# Adding password..."; echo "monocleOS UUID=$luksUUID none luks" > /etc/crypttab.initramfs echo "45"; sleep 1 echo "# Adding password..."; sed -i '/FILES/d' /etc/mkinitcpio.conf echo "60"; sleep 1 diff --git a/pkg/monocleOS b/pkg/monocleOS index e85b4da..4315ea5 100755 --- a/pkg/monocleOS +++ b/pkg/monocleOS @@ -42,16 +42,18 @@ function funcCloseAll { fi } -# NOT IMPLEMENTED YET! Function to keep all error messages uniformed and relative to an error code. Pass to function with funcError [error]. +# Not implemented. +# Keep all error messages uniformed and relative to an error code. +# Pass to function with funcError #function funcError { -# case "$1" in -# 021357) -# zenity --width=200 --error --title="" --text="Error code: $1" -# ;; -# *) -# echo $"Usage: $0 {Error}" -# exit 1 -# esac +# case "$1" in +# 021357) +# zenity --width=200 --error --title="" --text="Error code: $1" +# ;; +# *) +# echo $"Usage: $0 {Error}" +# exit 1 +# esac #} function funcFreeSpaceCheck { diff --git a/pkg/monocleOS-recovery b/pkg/monocleOS-recovery index 9d96097..af9ac97 100755 --- a/pkg/monocleOS-recovery +++ b/pkg/monocleOS-recovery @@ -33,9 +33,9 @@ function funcResetFormat { shred -zu /etc/NetworkManager/system-connections/* # shred in case of saved private network connection data hostname="monocleOS-$(cat /dev/urandom | tr -dc '0-9A-Z' | fold -w 4 | head -n 1)" echo "$hostname" > /etc/hostname - echo "127.0.0.1 localhost" > /etc/hosts - echo "::1 localhost" >> /etc/hosts - echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts + echo "127.0.0.1 localhost" > /etc/hosts + echo "::1 localhost" >> /etc/hosts + echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts } function funcResetDefaults { @@ -86,7 +86,7 @@ function funcResetPassword { chmod -R 000 /priv cryptsetup luksKillSlot -q /dev/disk/by-uuid/$luksUUID 1 --key-file=/tmp/luksKey.tmp # Disable recovery key, using temporary intermediate key created from caller cryptsetup luksChangeKey -q /dev/disk/by-uuid/$luksUUID --key-slot 0 --key-file=/tmp/luksKey.tmp $luksKey # Change (what was) user password to random keyfile - echo "monocleOS UUID=$luksUUID /priv/defaultKey.bin luks" > /etc/crypttab.initramfs + echo "monocleOS UUID=$luksUUID /priv/defaultKey.bin luks" > /etc/crypttab.initramfs echo MODULES=\($kmodules\) | tee /etc/mkinitcpio.conf > /dev/null echo FILES=\(/priv/defaultKey.bin\) | tee -a /etc/mkinitcpio.conf > /dev/null echo HOOKS=\(base systemd plymouth keyboard autodetect sd-vconsole modconf kms block sd-encrypt lvm2 filesystems fsck shutdown\) | tee -a /etc/mkinitcpio.conf > /dev/null