replace touch with > :

This commit is contained in:
Tobias Powalowski 2023-08-30 17:05:25 +02:00
parent d5c5a252dc
commit d409d918af
9 changed files with 28 additions and 30 deletions

View file

@ -18,7 +18,7 @@ cert-to-efi-sig-list -g "$GUID" PK.crt PK.esl
cert-to-efi-sig-list -g "$GUID" KEK.crt KEK.esl
cert-to-efi-sig-list -g "$GUID" DB.crt DB.esl
rm -f noPK.esl
touch noPK.esl
: > noPK.esl
sign-efi-sig-list -t "$(date --date='1 second' +'%Y-%m-%d %H:%M:%S')" \
-k PK.key -c PK.crt PK PK.esl PK.auth
sign-efi-sig-list -t "$(date --date='1 second' +'%Y-%m-%d %H:%M:%S')" \

View file

@ -39,7 +39,7 @@ _archboot_check
if [[ -n "${_D_SCRIPTS}" ]]; then
_update_installer_check
_network_check
touch /.update
: > /.update
_TITLE="Archboot $(uname -m) | Basic Setup | GIT Master Scripts"
_download_latest | _dialog --title " Archboot GIT Master " --gauge "Downloading latest config..." 6 75 0
clear
@ -47,7 +47,7 @@ fi
# Generate new environment and launch it with kexec
if [[ -n "${_L_COMPLETE}" || -n "${_L_INSTALL_COMPLETE}" ]] && [[ -z "${_G_RELEASE}" ]]; then
_update_installer_check
touch /.update
: > /.update
_TITLE="Archboot $(uname -m) | Basic Setup | New Environment"
_new_environment | _dialog --title "${_MENU_TITLE}" --gauge "Waiting for pacman keyring..." 6 75 0
clear
@ -55,7 +55,7 @@ fi
# Generate new images
if [[ -n "${_G_RELEASE}" ]]; then
_update_installer_check
touch /.update
: > /.update
_TITLE="Archboot $(uname -m) | Basic Setup | New Images"
_new_image | _dialog --title "${_MENU_TITLE}" --gauge "Removing not necessary files from /..." 6 75 0
clear
@ -66,9 +66,9 @@ if [[ -n "${_CUSTOM_X}" || -n "${_CUSTOM_WAYLAND}" ]]; then
fi
# Gnome, KDE/PLASMA or XFCE launch
if [[ -n "${_L_XFCE}" || -n "${_L_SWAY}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" || -n "${_L_GNOME_WAYLAND}" || -n "${_L_PLASMA_WAYLAND}" ]]; then
touch /.update
: > /.update
_TITLE="Archboot $(uname -m) | Basic Setup | Desktop Environment"
[[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_installed
[[ -e /var/cache/pacman/pkg/archboot.db ]] && : > /.graphic_installed
if [[ -n "${_L_XFCE}" ]]; then
_ENVIRONMENT="XFCE"
_install_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Initializing ${_ENVIRONMENT}..." 6 75 0
@ -124,7 +124,7 @@ fi
if [[ -n "${_FULL_SYSTEM}" ]]; then
_full_system_check
_update_installer_check
touch /.update
: > /.update
_TITLE="Archboot $(uname -m) | Basic Setup | Full System"
_full_system | _dialog --title "${_MENU_TITLE}" --gauge "Refreshing pacman package database..." 6 75 0
clear

View file

@ -247,7 +247,7 @@ _grub_install_bios() {
}
_grub_bios() {
touch /.archboot
: > /.archboot
_grub_install_bios &
_progress_wait "11" "99" "Setting up GRUB(2) BIOS..." "0.15"
_progress "100" "Setting up GRUB(2) BIOS completed."
@ -386,7 +386,7 @@ _setup_grub_uefi() {
## Install GRUB
_progress "10" "Setting up GRUB(2) UEFI..."
_chroot_mount
touch /.archboot
: > /.archboot
_grub_install_uefi &
_progress_wait "11" "99" "Setting up GRUB(2) UEFI..." "0.1"
_chroot_umount
@ -402,7 +402,7 @@ _setup_grub_uefi_sb() {
# generate GRUB with config embeded
#remove existing, else weird things are happening
[[ -f "${_DESTDIR}/${_GRUB_PREFIX_DIR}/grub${_SPEC_UEFI_ARCH}.efi" ]] && rm "${_DESTDIR}"/"${_GRUB_PREFIX_DIR}"/grub"${_SPEC_UEFI_ARCH}".efi
touch /.archboot
: > /.archboot
_grub_install_uefi_sb &
_progress_wait "11" "99" "Setting up GRUB(2) UEFI Secure Boot..." "0.1"
_progress "100" "Setting up GRUB(2) UEFI Secure Boot completed."

View file

@ -19,7 +19,7 @@ _mkinitcpio() {
_run_mkinitcpio() {
_chroot_mount
echo "Initramfs progress..." > /tmp/mkinitcpio.log
touch /.archboot
: > /.archboot
_mkinitcpio &
_progress_wait "0" "99" "Rebuilding initramfs on installed system..." "0.1"
if [[ $(cat /tmp/.mkinitcpio-retcode) -ne 0 ]]; then
@ -43,7 +43,7 @@ _mkinitcpio_error() {
}
_run_locale_gen() {
touch /.archboot
: > /.archboot
_locale_gen &
_progress_wait "0" "99" "Rebuilding glibc locales on installed system..." "0.05"
_progress "100" "Rebuilding glibc locales on installed system complete." 6 75

View file

@ -21,7 +21,7 @@ _run_pacman(){
[[ ! -d "${_DESTDIR}/var/cache/pacman/pkg" ]] && mkdir -p "${_DESTDIR}/var/cache/pacman/pkg"
[[ ! -d "${_DESTDIR}/var/lib/pacman" ]] && mkdir -p "${_DESTDIR}/var/lib/pacman"
echo "Installing Packages..." >/tmp/pacman.log
touch /.archboot
: > /.archboot
_pacman &
_progress_wait "0" "99" "Installing package(s):\n${_PACKAGES}..." "2"
# pacman finished, display scrollable output

View file

@ -49,15 +49,13 @@ if [[ "${TTY}" = "tty1" ]]; then
# cleanup mkinitcpio directories and files
rm -rf /sysroot/{hooks,install,kernel,new_root,sysroot} &>"${_NO_LOG}"
rm -f /sysroot/{VERSION,config,buildconfig,init} &>"${_NO_LOG}"
# systemd needs this for root_switch
touch /etc/initrd-release
_progress "100" "System is ready."
read -r -t 2
# fix clear screen on all terminals
printf "\ec" | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>"${_NO_LOG}"
# https://www.freedesktop.org/software/systemd/man/bootup.html
# enable systemd initrd functionality
touch /etc/initrd-release
: > /etc/initrd-release
# fix /run/nouser issues
systemctl stop systemd-user-sessions.service
# avoid issues by taking down services in ordered way
@ -122,7 +120,7 @@ _run_update_installer() {
}
if ! [[ -e /.vconsole-run ]]; then
touch /.vconsole-run
: > /.vconsole-run
FB_SIZE="$(cut -d 'x' -f 1 "$(find /sys -wholename '*fb0/modes')" 2>"${_NO_LOG}" | sed -e 's#.*:##g')"
if [[ "${FB_SIZE}" -gt '1900' ]]; then
SIZE="32"
@ -134,7 +132,7 @@ if ! [[ -e /.vconsole-run ]]; then
systemctl restart systemd-vconsole-setup
fi
if ! [[ -e /.clean-pacman-db ]]; then
touch /.clean-pacman-db
: > /.clean-pacman-db
_RM_PACMAN_DB="base grub libxml2 icu gettext refind amd-ucode intel-ucode edk2-shell \
libisoburn libburn libisofs mkinitcpio memtest linux-api-headers jansson libwbclient \
libbsd libmd libpcap libnftnl libnfnetlink libnetfilter_conntrack libsasl libldap memtest86+ \

View file

@ -72,7 +72,7 @@ _prepare_graphic() {
# fix libs first, then install packages from defaults
_GRAPHIC="${1}"
fi
touch /.archboot
: > /.archboot
_update_packages &
_progress_wait "2" "10" "Updating environment to latest packages..." "5"
_COUNT=11
@ -85,7 +85,7 @@ _prepare_graphic() {
rm -f /var/log/pacman.log
_COUNT="$((_COUNT+1))"
done
touch /.archboot
: > /.archboot
_install_graphic &
_progress_wait "${_COUNT}" "97" "Installing ${_ENVIRONMENT}..." "2"
if [[ ! -e "/.full_system" ]]; then

View file

@ -187,13 +187,13 @@ _new_environment() {
_clean_archboot
_clean_kernel_cache
[[ -d "${_W_DIR}" ]] || mkdir -p "${_W_DIR}"
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
_create_container &
_progress_wait "2" "49" "Generating container in ${_W_DIR}..." "3"
_clean_kernel_cache
_ram_check
# write initramfs to "${_ROOTFS_DIR}
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
_collect_files &
_progress_wait "50" "83" "Collecting rootfs files in ${_W_DIR}..." "1"
_progress "84" "Cleanup ${_W_DIR}..."
@ -217,7 +217,7 @@ _new_environment() {
sleep 2
# https://www.freedesktop.org/software/systemd/man/bootup.html
# enable systemd initrd functionality
touch /etc/initrd-release
: > /etc/initrd-release
# fix /run/nouser issues
systemctl stop systemd-user-sessions.service
# avoid issues by taking down services in ordered way
@ -257,7 +257,7 @@ _new_environment() {
cp -ar /etc/pacman.d/gnupg "${_ROOTFS_DIR}"/etc/pacman.d
cp /.pacsetup "${_ROOTFS_DIR}"/
fi
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
_create_initramfs &
_progress_wait "87" "94" "Creating initramfs ${_RAM}/${_INITRD}..." "1"
_progress "95" "Cleanup ${_W_DIR}..."
@ -321,7 +321,7 @@ _full_system() {
fi
_progress "100" "Full Arch Linux system is ready now."
sleep 2
touch /.full_system
: > /.full_system
}
_new_image() {
@ -337,7 +337,7 @@ _new_image() {
_W_DIR="$(mktemp -u archboot-release.XXX)"
# create container
[[ -d "${_W_DIR}" ]] || mkdir -p "${_W_DIR}"
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
_create_container &
_progress_wait "2" "20" "Generating container in ${_W_DIR}..." "10"
_progress "21" "Create archboot.db in ${_W_DIR}..."
@ -348,20 +348,20 @@ _new_image() {
_progress "22" "Removing lvm2 from container..."
${_NSPAWN} "${_W_DIR}" pacman -Rdd lvm2 --noconfirm &>"${_NO_LOG}"
# generate local iso in container, umount tmp it's a tmpfs and weird things could happen then
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
(${_NSPAWN} "${_W_DIR}" /bin/bash -c "umount /tmp;rm -rf /tmp/*; archboot-${_RUNNING_ARCH}-iso.sh -g -s -p=${_PRESET_LOCAL} \
-i=${_ISONAME}-local-${_RUNNING_ARCH}" > "${_LOG}"; rm -rf "${_W_DIR}"/var/cache/pacman/pkg/*; rm "${_W_DIR}"/.archboot) &
_ram_check
_progress_wait "23" "55" "Generating local ISO..." "10"
# generate latest iso in container
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
(${_NSPAWN} "${_W_DIR}" /bin/bash -c "umount /tmp;rm -rf /tmp/*;archboot-${_RUNNING_ARCH}-iso.sh -g -s -p=${_PRESET_LATEST} \
-i=${_ISONAME}-latest-${_RUNNING_ARCH}" > "${_LOG}"; rm "${_W_DIR}"/.archboot) &
_progress_wait "56" "69" "Generating latest ISO..." "10"
_progress "70" "Installing lvm2 to container..."
${_NSPAWN} "${_W_DIR}" pacman -Sy lvm2 --noconfirm &>"${_NO_LOG}"
fi
touch "${_W_DIR}"/.archboot
: > "${_W_DIR}"/.archboot
# generate iso in container
(${_NSPAWN} "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_RUNNING_ARCH}-iso.sh -g \
-i=${_ISONAME}-${_RUNNING_ARCH}" > "${_LOG}"; rm "${_W_DIR}"/.archboot) &

View file

@ -799,7 +799,7 @@ The calculated size to boot the image follows the formula:<br>
<tr>
<td>Real Machine boot to prompt<sup>2</sup></td>
<td class="MyYes">52 seconds</td>
<td class="MyNo">134 seconds</td>
<td class="MyNo">104 seconds</td>
</tr>
<tr>
<td>Virtual Machine boot to prompt<sup>3</sup></td>