mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
reorder update-installer options, allow only one graphical environment on local image
This commit is contained in:
parent
e44b1a86e1
commit
2e58113234
2 changed files with 31 additions and 24 deletions
|
@ -122,29 +122,34 @@ fi
|
||||||
|
|
||||||
# Gnome, KDE/PLASMA or XFCE launch
|
# Gnome, KDE/PLASMA or XFCE launch
|
||||||
if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" || "${_L_GNOME_WAYLAND}" == "1" || "${_L_KDE_WAYLAND}" == "1" ]]; then
|
if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" || "${_L_GNOME_WAYLAND}" == "1" || "${_L_KDE_WAYLAND}" == "1" ]]; then
|
||||||
if ! [[ -d /usr.zram ]]; then
|
if [[ -e "/.graphic_run" ]]; then
|
||||||
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..."
|
echo -e "\033[1m\033[91mError: Graphical environment already installed ...\033[0m"
|
||||||
_zram_usr "${_ZRAM_SIZE}"
|
|
||||||
else
|
else
|
||||||
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram already done ..."
|
if ! [[ -d /usr.zram ]]; then
|
||||||
|
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..."
|
||||||
|
_zram_usr "${_ZRAM_SIZE}"
|
||||||
|
else
|
||||||
|
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram already done ..."
|
||||||
|
fi
|
||||||
|
echo -e "\033[1mStep 2/5:\033[0m Waiting for gpg pacman keyring import to finish ..."
|
||||||
|
_gpg_check
|
||||||
|
[[ -e /var/cache/pacman/pkg/archboot.db ]] && touch /.graphic_run
|
||||||
|
[[ "${_L_XFCE}" == "1" ]] && _install_xfce
|
||||||
|
[[ "${_L_GNOME}" == "1" ]] && _install_gnome
|
||||||
|
[[ "${_L_GNOME_WAYLAND}" == "1" ]] && _install_gnome_wayland
|
||||||
|
[[ "${_L_KDE}" == "1" ]] && _install_kde
|
||||||
|
[[ "${_L_KDE_WAYLAND}" == "1" ]] && _install_kde_wayland
|
||||||
|
echo -e "\033[1mStep 5/5:\033[0m Starting avahi-daemon ..."
|
||||||
|
systemctl start avahi-daemon.service
|
||||||
|
# only start vnc on xorg environment
|
||||||
|
[[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" ]] && _autostart_vnc
|
||||||
|
_chromium_flags
|
||||||
|
[[ "${_L_XFCE}" == "1" ]] && _start_xfce
|
||||||
|
[[ "${_L_GNOME}" == "1" ]] && _start_gnome
|
||||||
|
[[ "${_L_GNOME_WAYLAND}" == "1" ]] && _start_gnome_wayland
|
||||||
|
[[ "${_L_KDE}" == "1" ]] && _start_kde
|
||||||
|
[[ "${_L_KDE_WAYLAND}" == "1" ]] && _start_kde_wayland
|
||||||
fi
|
fi
|
||||||
echo -e "\033[1mStep 2/5:\033[0m Waiting for gpg pacman keyring import to finish ..."
|
|
||||||
_gpg_check
|
|
||||||
[[ "${_L_XFCE}" == "1" ]] && _install_xfce
|
|
||||||
[[ "${_L_GNOME}" == "1" ]] && _install_gnome
|
|
||||||
[[ "${_L_GNOME_WAYLAND}" == "1" ]] && _install_gnome_wayland
|
|
||||||
[[ "${_L_KDE}" == "1" ]] && _install_kde
|
|
||||||
[[ "${_L_KDE_WAYLAND}" == "1" ]] && _install_kde_wayland
|
|
||||||
echo -e "\033[1mStep 5/5:\033[0m Starting avahi-daemon ..."
|
|
||||||
systemctl start avahi-daemon.service
|
|
||||||
# only start vnc on xorg environment
|
|
||||||
[[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" ]] && _autostart_vnc
|
|
||||||
_chromium_flags
|
|
||||||
[[ "${_L_XFCE}" == "1" ]] && _start_xfce
|
|
||||||
[[ "${_L_GNOME}" == "1" ]] && _start_gnome
|
|
||||||
[[ "${_L_GNOME_WAYLAND}" == "1" ]] && _start_gnome_wayland
|
|
||||||
[[ "${_L_KDE}" == "1" ]] && _start_kde
|
|
||||||
[[ "${_L_KDE_WAYLAND}" == "1" ]] && _start_kde_wayland
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,18 +40,20 @@ usage () {
|
||||||
# local image
|
# local image
|
||||||
if [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then
|
if [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then
|
||||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]] ; then
|
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]] ; then
|
||||||
_graphic_options
|
if ! [[ -e "/.graphic_run" ]]; then
|
||||||
echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled."
|
_graphic_options
|
||||||
|
echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# latest image
|
# latest image
|
||||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 ]] ; then
|
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 ]] ; then
|
||||||
_graphic_options
|
_graphic_options
|
||||||
echo -e " \033[1m-custom-wayland\033[0m Install custom Wayland environment."
|
|
||||||
fi
|
fi
|
||||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then
|
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then
|
||||||
echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled."
|
echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled."
|
||||||
echo -e " \033[1m-custom-xorg\033[0m Install custom X environment."
|
echo -e " \033[1m-custom-xorg\033[0m Install custom X environment."
|
||||||
|
[[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 ]] && echo -e " \033[1m-custom-wayland\033[0m Install custom Wayland environment."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue