This commit is contained in:
Valeria Fadeeva 2023-10-17 22:58:39 +05:00
parent e4fb464aed
commit 451632b209
13 changed files with 214 additions and 16 deletions

9
00_reset_2.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
sudo rm -rf ./{work,out}
rm airootfs/opt/extra-drivers/*.pkg.tar.*
rm airootfs/root/packages/*.pkg.tar.*
rm airootfs/usr/share/packages/*.pkg.tar.*
mkdir ./{work,out}
echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s
notify-send -a "$(basename $(pwd)): Reset" -t 999999999 "finished" "$(date '+%Y.%m.%d %H:%M:%S')"

Binary file not shown.

View File

@ -20,13 +20,13 @@ chown -R 0:0 /etc/skel
tar -xJvf /root/archives/liveuser.tar.xz -C /home/liveuser --strip=1 --overwrite
chown -R 1000:1000 /home/liveuser
setfacl -m u:sddm:x /home/liveuser/
setfacl -m u:sddm:r /home/liveuser/.face.icon
setfacl -m u:sddm:r /home/liveuser/.face
cp /home/liveuser/.face /home/liveuser/liveuser.png
cp /home/liveuser/liveuser.png /var/lib/AccountsService/icons/liveuser
rm /home/liveuser/liveuser.png
# setfacl -m u:sddm:x /home/liveuser/
# setfacl -m u:sddm:r /home/liveuser/.face.icon
# setfacl -m u:sddm:r /home/liveuser/.face
#
# cp /home/liveuser/.face /home/liveuser/liveuser.png
# cp /home/liveuser/liveuser.png /var/lib/AccountsService/icons/liveuser
# rm /home/liveuser/liveuser.png
cp -fT /etc/melawy-linux-release /etc/lsb-release

View File

@ -35,7 +35,3 @@ package=lightdm
if pacman -Qs $package > /dev/null ; then
ln -sf /usr/lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service
fi
echo "#################################"
echo "End displaymanager-check"
echo "#################################"

View File

@ -0,0 +1,25 @@
#!/bin/sh
# borrowed from manjaro livecd
xdg=$(xdg-user-dir DESKTOP)
src='/usr/share/applications'
## We don't need .desktop on desktop,
## actually we should remove .desktop or fix the .desktop as it is running with pkexec,
## and using current calamares config (not even running with script to provide logs).
#if [[ -f /usr/bin/calamares ]]; then
# install -Dm755 $src/calamares.desktop \
# $xdg/calamares.desktop
#fi
# workaround for glib trash bug (https://bugzilla.gnome.org/show_bug.cgi?id=748248)
userid=$(id -u $USER)
if [ ! -d "/.Trash-$userid" ]; then
sudo mkdir -p /.Trash-$userid/{expunged,files,info}
sudo chown -R $userid /.Trash-$userid
fi
# mark launchers trusted for XFCE 4.18
for f in $(ls $xdg/*desktop); do
gio set -t string $f metadata::xfce-exe-checksum "$(sha256sum $f | awk '{print $1}')"
done;

View File

@ -0,0 +1,48 @@
#!/bin/bash
_remove_pacman_package() {
local _pkgname="$1"
pacman -Rsnc "$_pkgname" --noconfirm || true
}
# remove pkgs installed for VMs
_clean_vm_packages() {
#remove virtualbox
if pacman -Qi virtualbox-guest-utils &> /dev/null; then
systemctl disable vboxservice.service
_remove_pacman_package virtualbox-guest-utils
fi
if pacman -Qi virtualbox-guest-utils-nox &> /dev/null; then
systemctl disable vboxservice.service
_remove_pacman_package virtualbox-guest-utils-nox
fi
#remove vmware
if [ -f /etc/xdg/autostart/vmware-user.desktop ]; then
rm /etc/xdg/autostart/vmware-user.desktop
fi
if pacman -Qi open-vm-tools &> /dev/null; then
systemctl disable vmtoolsd.service
_remove_pacman_package open-vm-tools
fi
if [ -f /etc/systemd/system/multi-user.target.wants/vmtoolsd.service ]; then
rm /etc/systemd/system/multi-user.target.wants/vmtoolsd.service
fi
#remove qemu
if pacman -Qi qemu-guest-agent &> /dev/null; then
systemctl disable qemu-guest-agent.service
_remove_pacman_package qemu-guest-agent
fi
}
_check_not_running_vm="$(systemd-detect-virt | grep -q 'none'; echo $?)"
if [[ "${_check_not_running_vm}" -eq 0 ]]; then
_clean_vm_packages
fi
# vim:set ft=bash sw=2 sts=2 et:

60
airootfs/usr/local/bin/removeun Executable file
View File

@ -0,0 +1,60 @@
#!/bin/bash
#set -e
_clean_files() {
local _files_to_remove=(
/etc/modprobe.d/nvidia-utils.conf
/etc/modules-load.d/nvidia-utils.conf
/usr/local/bin/choose-mirror
/usr/local/bin/prepare-live-desktop.sh
/usr/local/bin/removeun-online
/usr/local/share/livecd-sound
)
local xx
for xx in "${_files_to_remove[@]}"; do rm -rf "$xx" || true; done
}
_clean_packages() {
local _packages_to_remove=(
gparted
grsync
cachyos-calamares-grub
cachyos-calamares-systemd
cachyos-calamares-refind
cachyos-calamares
cachyos-calamares-config
edk2-shell
boost-libs
doxygen
expect
gpart
tcpdump
arch-install-scripts
squashfs-tools
extra-cmake-modules
cmake
elinks
yaml-cpp
syslinux
clonezilla
memtest86+
mkinitcpio-archiso
)
local _check_nvidia_card="$(chwd --is_nvidia_card | grep -q 'NVIDIA card found!'; echo $?)"
if [[ "${_check_nvidia_card}" -ne 0 ]]; then
echo "No NVIDIA card detected. Removing nvidia drivers"
_packages_to_remove+=(nvidia-dkms nvidia-utils egl-wayland)
fi
local xx
# @ does one by one to avoid errors in the entire process
# taken from Erik Dubois script
for xx in "${_packages_to_remove[@]}"; do pacman -Rsnc "$xx" --noconfirm; done
}
_clean_packages
_clean_files
# vim:set ft=bash sw=2 sts=2 et:

View File

@ -0,0 +1,55 @@
#!/bin/bash
_clean_packages() {
local _leave_these_packages="base\nbase-devel\ncachyos-keyring\ncachyos-hello\ngrub\nefibootmgr\noctopi\nca-certificates\n"
local _leave_these_basepackages="filesystem\ngcc-libs\nglibc\nglib2\nbash\ncoreutils\nfile\nfindutils\ngawk\ngrep\nprocps-ng\nsed\ntar\ngettext\npciutils\npsmisc\nshadow\nutil-linux\nbzip2\ngzip\nxz\nlicenses\npacman\nsystemd\nsystemd-sysvcompat\niputils\niproute2\n"
local _packages_to_remove=($(comm -23 <(pacman -Qq | sort) <({ pacman -Qqg base-devel; pacman -Qqg cachyos; printf $_leave_these_packages; printf $_leave_these_basepackages; } | sort -u)))
local xx
# @ does one by one to avoid errors in the entire process
# * can be used to treat all packages in one command
for xx in "${_packages_to_remove[@]}"; do pacman -Rs "$xx" --noconfirm; done
# making sure they are removed
# local _toberemoved_str=$'bash-completion\nxorg-xinit\nxorg-xkill\nxorg-xinput\nxorg-xrandr\nxorg-xrdb\nmkinitcpio-openswap\nalacritty\nkonsole\nkwin-scripts-forceblur\nnetworkmanager-vpnc\nnetworkmanager-qt\nnetworkmanager-openvpn\nwireguard-tools\nopenconnect\nopenvpn\nqt5-xmlpatterns\ndoxygen\ntcpdump\ndmidecode\nkparts\npolkit-qt5\nxorg-server\nxorg-apps\nqt5-tools\nzfs-utils\nlinux-cachyos-zfs\nwget\nvirtualbox-guest-utils\nxf86-video-vesa\nxf86-video-amdgpu\nxf86-video-intel\nnvidia-dkms\nnvidia-utils\nlightdm\nlightdm-gtk-greeter\nlightdm-webkit2-greeter\nbase-devel\nlinux-cachyos-headers\nplasma-browser-integration\nplasma-desktop\nplasma-firewall\nplasma-framework\nplasma-integration\nplasma-nm\nplasma-pa\nplasma-systemmonitor\nplasma-thunderbolt\nplasma-workspace\ndiscover\npackagekit-qt5\nxed\nparole\nristretto\ndolphin\ndolphin-plugins\ncapitaine-cursors\ngtk-engine-murrine\ngnome-themes-extra\nadwaita-icon-theme\nfile-roller\nlibwnck3\nnetwork-manager-applet\ngalculator\ncachy-browser\nkvantum-qt5\nqt5ct\nneofetch\nopen-vm-tools\nxf86-input-vmmouse\nxf86-video-vmware\ncachyos-kde-settings\ncachyos-picom-config\ncachyos-rate-mirrors\ncachyos-kernel-manager\nchwd\noctopi\nreflector-simple\nmeld\nparu\nnordic-theme-git\nlightly-git\ncachyos-nord-kde-theme-git\nchar-white'
# local _toberemoved_packages
# readarray -t _toberemoved_packages <<< "$_toberemoved_str"
# local xxx
# for xxx in "${_toberemoved_packages[@]}"; do pacman -Rs "$xxx" --noconfirm; done
rm /etc/sddm.conf || true
}
_pacman_fix() {
pacman-key --init
pacman-key --populate cachyos
}
_try_v3() {
/lib/ld-linux-x86-64.so.2 --help | grep "x86-64-v3 (supported, searched)" > /dev/null
local pacman_conf="/etc/pacman.conf"
local pacman_conf_cachyos="/etc/pacman-more.conf"
local pacman_conf_path_backup="/etc/pacman.conf.bak"
if [ $? -eq 0 ]; then
echo "x86-64-v3 is supported"
sed -i 's/Architecture = auto/#Architecture = auto/' $pacman_conf_cachyos
sed -i 's/#<disabled_v3>//g' $pacman_conf_cachyos
echo "backup old config"
mv $pacman_conf $pacman_conf_path_backup
echo "CachyOS -v3 Repo changed"
mv $pacman_conf_cachyos $pacman_conf
else
echo "x86-64-v3 is not supported"
fi
}
_clean_packages
_try_v3
_pacman_fix

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -259,19 +259,19 @@ ttf-opensans
# ENDEAVOUROS REPO
## General
#reflector-simple
#eos-hooks
#welcome
yay
rate-mirrors
endeavouros-theming
eos-apps-info
eos-hooks
eos-log-tool
eos-packagelist
eos-quickstart
eos-rankmirrors
eos-update-notifier
nvidia-inst
rate-mirrors
#reflector-simple
#welcome
yay
## Calamares EndeavourOS
#calamares
@ -658,6 +658,7 @@ melawy-dracut-initramfs
melawy-dracut-ukify
melawy-refind-menu-generator
melawy-etc-skel-std-powerman
melawy-hooks
melawy-plasma-plasmoid-DittoMenu
melawy-plasma-plasmoid-Menu11

View File

@ -33,4 +33,8 @@ file_permissions=(
["/usr/local/bin/dmcheck"]="0:0:755"
["/usr/local/bin/fix-keys"]="0:0:755"
["/usr/local/bin/livecd-sound"]="0:0:755"
["/usr/local/bin/prepare-live-desktop.sh"]="0:0:755"
["/usr/local/bin/remove-virtual-machine-pkgs"]="0:0:755"
["/usr/local/bin/removeun"]="0:0:755"
["/usr/local/bin/removeun-online"]="0:0:755"
)