From 524e5b0ab4fdd6c5c1dce0633f7c91164d9e9edd Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 4 Aug 2023 08:12:11 +0200 Subject: [PATCH] fix package grep --- usr/lib/archboot/update/desktop.sh | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/usr/lib/archboot/update/desktop.sh b/usr/lib/archboot/update/desktop.sh index 49d76155a..f38dd5ce2 100644 --- a/usr/lib/archboot/update/desktop.sh +++ b/usr/lib/archboot/update/desktop.sh @@ -35,7 +35,9 @@ _prepare_graphic() { pacman -Syu ${_IGNORE} --noconfirm &>"${_NO_LOG}" || exit 1 [[ ! -e "/.full_system" ]] && _cleanup_install # check for qxl module - grep -q qxl /proc/modules && grep -q xorg "${_GRAPHIC}" && _GRAPHIC="${_GRAPHIC} xf86-video-qxl" + if grep -q qxl /proc/modules; then + echo ${_GRAPHIC} | grep -q xorg && _GRAPHIC="${_GRAPHIC} xf86-video-qxl" + fi _progress "4" "Running pacman to install packages: ${_GRAPHIC}..." for i in ${_GRAPHIC}; do #shellcheck disable=SC2086 @@ -83,27 +85,6 @@ _prepare_graphic() { systemctl reload dbus-org.freedesktop.login1.service } -_install_graphic () { - [[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_installed - [[ -n "${_L_XFCE}" ]] && _install_xfce - [[ -n "${_L_GNOME}" ]] && _install_gnome - [[ -n "${_L_GNOME_WAYLAND}" ]] && _install_gnome_wayland - [[ -n "${_L_PLASMA}" ]] && _install_plasma - [[ -n "${_L_PLASMA_WAYLAND}" ]] && _install_plasma_wayland - [[ -n "${_L_SWAY}" ]] && _install_sway - # only start vnc on xorg environment - _progress "93" "Setting up VNC and browser..." - [[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc - command -v firefox &>"${_NO_LOG}" && _firefox_flags - command -v chromium &>"${_NO_LOG}" && _chromium_flags - [[ -n "${_L_XFCE}" ]] && _start_xfce - [[ -n "${_L_GNOME}" ]] && _start_gnome - [[ -n "${_L_GNOME_WAYLAND}" ]] && _start_gnome_wayland - [[ -n "${_L_PLASMA}" ]] && _start_plasma - [[ -n "${_L_PLASMA_WAYLAND}" ]] && _start_plasma_wayland - [[ -n "${_L_SWAY}" ]] && _start_sway -} - _hint_graphic_installed () { echo -e "\e[1;91mError: Graphical environment already installed...\e[m" echo -e "You are running in \e[1mOffline Mode\e[m with less than \e[1m4500 MB RAM\e[m, which only can launch \e[1mone\e[m environment."