From d4a33ac16f2907aec1b3858eb563d5e6d38d3f5b Mon Sep 17 00:00:00 2001 From: proledatarian Date: Fri, 23 Aug 2024 16:25:42 +0200 Subject: [PATCH] Update. --- archiso.sh | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/archiso.sh b/archiso.sh index 742abeb..6b369cd 100755 --- a/archiso.sh +++ b/archiso.sh @@ -2,8 +2,7 @@ ### https://wiki.archlinux.org/title/Archiso -#set -eou pipefail -set -x +set -eou pipefail # Test if archiso is installed if ! pacman -Qs archiso > /dev/null; then @@ -65,9 +64,9 @@ workdir="/tmp/archiso" root_etc="${prof_dir}/airootfs/etc" # Delete old profile -sudo rm -rf "${prof_dir}" -sudo rm -rf ${dir}/output/* -sudo rm -rf ${workdir}/* +err sudo rm -rf "${prof_dir}" +err sudo rm -rf ${dir}/output/* +err sudo rm -rf ${workdir} # Copy new profile template # https://wiki.archlinux.org/title/Archiso#Prepare_a_custom_profile @@ -123,18 +122,34 @@ echo "${USER}":x:1000: >> "${root_etc}/group" echo root:!*::root > "${root_etc}/gshadow" echo "${USER}":!*:: >> "${root_etc}/gshadow" -sed -i '27s/.*/ ["\/etc\/gshadow"]="0:0:0400"/' "$HOME/.archiso/releng/profiledef.sh" -echo ")" >> "$HOME/.archiso/releng/profiledef.sh" +sed -i '27s/.*/ ["\/etc\/gshadow"]="0:0:0400"/' "${HOME}/.archiso/releng/profiledef.sh" +echo ")" >> "${HOME}/.archiso/releng/profiledef.sh" echo "%wheel ALL=(ALL) ALL" > "${root_etc}/sudoers" +# Change keyboard layout to German +echo "KEYMAP=de-latin1" > "${root_etc}/vconsole.conf" + +mkdir -p "${root_etc}/X11/xorg.conf.d" +cat << EOF > "${root_etc}/X11/xorg.conf.d/00-keyboard.conf" +# Written by systemd-localed(8), read by systemd-localed and Xorg. It's +# probably wise not to edit this file manually. Use localectl(1) to +# instruct systemd-localed to update it. +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "de" +EndSection +EOF + # Create image mkdir -p "${workdir}" -nice -n 19 ionice -c 3 sudo mkarchiso -w "${workdir}" -o "${dir}/output" "${prof_dir}" +sudo mkarchiso -w "${workdir}" -o "${dir}/output" "${prof_dir}" -notify-send -t 5000 'ArchISO' 'ISO created successfully.' +# Notification +notify-send -t 5000 'ArchISO' 'ISO created successfully.' && +if [[ -f /usr/share/sounds/ocean/stereo/dialog-information.oga ]]; then + pw-play /usr/share/sounds/ocean/stereo/dialog-information.oga +fi -exit 0 - -# To-Dos -# - Locale DE \ No newline at end of file +exit 0 \ No newline at end of file