1
0
Fork 0
mirror of synced 2024-12-22 16:18:59 -05:00

Disable snapshot reject hook if not booted into snapshot

This commit is contained in:
TNE 2022-04-06 20:02:50 +02:00
parent 58f1185dc7
commit a35e52d8dd
3 changed files with 15 additions and 2 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Librewish <librewish@gmail.com>
pkgname=garuda-common-settings
pkgver=2.5.8
pkgver=2.6.0
pkgrel=1
arch=('any')
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"

View file

@ -4,11 +4,11 @@ post_install() {
systemctl enable btrfs-scrub.timer
systemctl enable btrfs-trim.timer
systemctl enable garuda-pacman-lock
systemctl enable garuda-pacman-snapshot-reject
systemctl --global enable psd
}
post_upgrade() {
echo "Performing misc postinstall operations..."
mkfontscale /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1
mkfontdir /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1
@ -17,4 +17,8 @@ post_upgrade() {
glib-compile-schemas usr/share/glib-2.0/schemas
gtk-update-icon-cache -ftq usr/share/icons/hicolor
/bin/sh -c 'dconf update'
if [[ $(vercmp 2.6.0 $2) -gt 0 ]]; then
systemctl enable garuda-pacman-snapshot-reject
fi
}

View file

@ -0,0 +1,9 @@
[Unit]
Description=Optimizing pacman hooks
[Service]
Type=oneshot
ExecStart=bash -c "grep -qE 'subvol=@\/.snapshots\/[0-9]+\/snapshot' /proc/cmdline || mount --bind /dev/null /usr/share/libalpm/hooks/01-snapshot-reject.hook"
[Install]
WantedBy=multi-user.target