Skip to content

Commit

Permalink
Replace tabs with spaces in heredoc to pipe correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedeldi committed Apr 4, 2023
1 parent 273e28b commit 4a13420
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
8 changes: 4 additions & 4 deletions monocleOS_Installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions pkg/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion pkg/initMonocle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 11 additions & 9 deletions pkg/monocleOS
Original file line number Diff line number Diff line change
Expand Up @@ -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 <error>
#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 {
Expand Down
8 changes: 4 additions & 4 deletions pkg/monocleOS-recovery
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4a13420

Please sign in to comment.