aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--README.md17
-rwxr-xr-xbin/pacman-offline7
-rw-r--r--config/offline-include.conf2
-rwxr-xr-xsystemd/pacman-offline7
-rw-r--r--systemd/pacman-offline-prepare.service2
-rw-r--r--systemd/pacman-offline-prepare.timer2
-rw-r--r--systemd/pacman-offline-reboot.service2
-rw-r--r--systemd/pacman-offline-reboot.timer2
-rw-r--r--systemd/pacman-offline.service2
10 files changed, 30 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 3f9ffb8..dd0e1fa 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ SED := sed
# this is just a fallback in case you do not
# use git but downloaded a release tarball...
-VERSION := 0.3.2
+VERSION := 0.3.4
all: README.html
@@ -20,6 +20,7 @@ install: install-bin install-doc
install-bin:
$(INSTALL) -D -m0755 bin/pacman-offline $(DESTDIR)/usr/bin/pacman-offline
$(INSTALL) -D -m0644 config/offline.conf $(DESTDIR)/etc/pacman.d/offline.conf
+ $(INSTALL) -D -m0644 config/offline-include.conf $(DESTDIR)/etc/pacman.d/offline-include.conf
$(INSTALL) -D -m0644 hook/99-pacman-offline.hook $(DESTDIR)/usr/share/libalpm/hooks/99-pacman-offline.hook
$(INSTALL) -D -m0644 polkit/pacman-offline.rules $(DESTDIR)/usr/share/polkit-1/rules.d/pacman-offline.rules
$(INSTALL) -D -m0644 systemd/pacman-offline.service $(DESTDIR)/usr/lib/systemd/system/pacman-offline.service
diff --git a/README.md b/README.md
index 6beb1a7..3b37c0b 100644
--- a/README.md
+++ b/README.md
@@ -70,16 +70,21 @@ This will trigger at night, if updates are pending and prepared.
Configuration
-------------
-A sinppet for inclusion in `/etc/pacman.conf` is shipped. To make use of
-it add this line:
+Two sinppets for inclusion in `/etc/pacman.conf` are shipped. To make use of
+them add these line:
Include = /etc/pacman.d/offline.conf
+ #Include = /etc/pacman.d/offline-include.conf
-It will cause `pacman` to ignore linux packages and prevent breaking module
-loading. These packages are not ignored on offline update.
+The first one will cause `pacman` to ignore linux packages and prevent
+breaking module loading and hibernation. These packages are not ignored
+on offline update.
-Modify `/etc/pacman.d/offline.conf` to your needs by changing or adding
-packages.
+The second one has the opposite effect, it is included on offline action
+only.
+
+Modify `/etc/pacman.d/offline.conf` and `/etc/pacman.d/offline-include.conf`
+to your needs by changing or adding packages, or adding new directives.
License and warranty
--------------------
diff --git a/bin/pacman-offline b/bin/pacman-offline
index cb46cb4..b5b25df 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -1,6 +1,6 @@
#!/bin/sh
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -107,7 +107,10 @@ 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
+sed \
+ -e '/^Include *= *\/etc\/pacman\.d\/offline\.conf$/s|^|#|' \
+ -e '/^#Include *= *\/etc\/pacman\.d\/offline-include\.conf$/s|^#||' \
+ < /etc/pacman.conf > /run/pacman.conf
# remove the symlink for now, will be recreated it later
rm -f /system-update
diff --git a/config/offline-include.conf b/config/offline-include.conf
new file mode 100644
index 0000000..879919e
--- /dev/null
+++ b/config/offline-include.conf
@@ -0,0 +1,2 @@
+# Add this file as commented include, and it will be included on
+# offline action.
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index 9bae2ee..2246d3e 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -1,6 +1,6 @@
#!/bin/sh
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,10 @@ 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
+sed \
+ -e '/^Include *= *\/etc\/pacman\.d\/offline\.conf$/s|^|#|' \
+ -e '/^#Include *= *\/etc\/pacman\.d\/offline-include\.conf$/s|^#||' \
+ < /etc/pacman.conf > /run/pacman.conf
# remove triggering symlink and reboot & poweroff override
rm --force \
diff --git a/systemd/pacman-offline-prepare.service b/systemd/pacman-offline-prepare.service
index c9b5ba5..3979f0b 100644
--- a/systemd/pacman-offline-prepare.service
+++ b/systemd/pacman-offline-prepare.service
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline-prepare.timer b/systemd/pacman-offline-prepare.timer
index 598b387..a0b537c 100644
--- a/systemd/pacman-offline-prepare.timer
+++ b/systemd/pacman-offline-prepare.timer
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline-reboot.service b/systemd/pacman-offline-reboot.service
index c131d70..20a6e47 100644
--- a/systemd/pacman-offline-reboot.service
+++ b/systemd/pacman-offline-reboot.service
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline-reboot.timer b/systemd/pacman-offline-reboot.timer
index b6852a9..cf23ce5 100644
--- a/systemd/pacman-offline-reboot.timer
+++ b/systemd/pacman-offline-reboot.timer
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline.service b/systemd/pacman-offline.service
index 516acae..1ddca55 100644
--- a/systemd/pacman-offline.service
+++ b/systemd/pacman-offline.service
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by