diff options
Diffstat (limited to 'systemd/pacman-offline')
-rwxr-xr-x | systemd/pacman-offline | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline index 3e9133b..39ed094 100755 --- a/systemd/pacman-offline +++ b/systemd/pacman-offline @@ -7,6 +7,11 @@ if [ "$(readlink '/system-update')" != '/var/cache/pacman/pkg' ]; then exit 0 fi +# exclude /etc/pacman.d/offline.conf +function finish { rm -f /run/pacman.conf; } +trap finish EXIT +sed '/^Include *= *\/etc\/pacman\.d\/offline\.conf$/s|^|#|' < /etc/pacman.conf > /run/pacman.conf + # remove triggering symlink rm -f /system-update @@ -14,7 +19,7 @@ rm -f /system-update if [ "$(pacman --sync --print --needed archlinux-keyring | wc -l)" -gt 0 ]; then pacman --sync --noconfirm archlinux-keyring fi -pacman --sync --noconfirm --sysupgrade +pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade # clean up package cache pacman --sync --noconfirm --clean |