Disable snapshot reject hook if not booted into snapshot
This commit is contained in:
parent
58f1185dc7
commit
a35e52d8dd
3 changed files with 15 additions and 2 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -2,7 +2,7 @@
|
||||||
# Maintainer: Librewish <librewish@gmail.com>
|
# Maintainer: Librewish <librewish@gmail.com>
|
||||||
|
|
||||||
pkgname=garuda-common-settings
|
pkgname=garuda-common-settings
|
||||||
pkgver=2.5.8
|
pkgver=2.6.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
|
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
|
||||||
|
|
|
@ -4,11 +4,11 @@ post_install() {
|
||||||
systemctl enable btrfs-scrub.timer
|
systemctl enable btrfs-scrub.timer
|
||||||
systemctl enable btrfs-trim.timer
|
systemctl enable btrfs-trim.timer
|
||||||
systemctl enable garuda-pacman-lock
|
systemctl enable garuda-pacman-lock
|
||||||
|
systemctl enable garuda-pacman-snapshot-reject
|
||||||
systemctl --global enable psd
|
systemctl --global enable psd
|
||||||
}
|
}
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
|
|
||||||
echo "Performing misc postinstall operations..."
|
echo "Performing misc postinstall operations..."
|
||||||
mkfontscale /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1
|
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
|
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
|
glib-compile-schemas usr/share/glib-2.0/schemas
|
||||||
gtk-update-icon-cache -ftq usr/share/icons/hicolor
|
gtk-update-icon-cache -ftq usr/share/icons/hicolor
|
||||||
/bin/sh -c 'dconf update'
|
/bin/sh -c 'dconf update'
|
||||||
|
|
||||||
|
if [[ $(vercmp 2.6.0 $2) -gt 0 ]]; then
|
||||||
|
systemctl enable garuda-pacman-snapshot-reject
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
Loading…
Reference in a new issue