summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Georgievski2015-06-10 13:09:35 +0200
committerDamjan Georgievski2015-06-10 13:09:35 +0200
commit29e06ec3bb79ef051bdc3c7c36a543bfdbac1115 (patch)
treeb0d64c080d05ef23e8d0e70119b3476be5fdebb5
downloadaur-29e06ec3bb79ef051bdc3c7c36a543bfdbac1115.tar.gz
initial commit to aur4
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD19
-rw-r--r--suspend-modules14
3 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8517ace847a7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = systemd-suspend-modules
+ pkgdesc = Reload modules on suspend/hibernate with systemd
+ pkgver = 1.0
+ pkgrel = 2
+ url = https://aur.archlinux.org/packages/systemd-suspend-modules/
+ arch = any
+ license = GPL
+ depends = systemd
+ backup = etc/suspend-modules.conf
+ source = suspend-modules
+ md5sums = fb9dd7f92479348a0fe1a784222e77d1
+
+pkgname = systemd-suspend-modules
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..50216a57f0d0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Damjan Georgievski <gdamjan@gmail.com>
+pkgname=systemd-suspend-modules
+pkgver=1.0
+pkgrel=2
+pkgdesc="Reload modules on suspend/hibernate with systemd"
+arch=('any')
+url="https://aur.archlinux.org/packages/systemd-suspend-modules/"
+license=('GPL')
+depends=('systemd')
+backup=('etc/suspend-modules.conf')
+source=("suspend-modules")
+
+package() {
+ # Install files
+ install -Dm755 "${srcdir}/suspend-modules" "${pkgdir}/usr/lib/systemd/system-sleep/suspend-modules"
+ mkdir ${pkgdir}/etc/
+ touch ${pkgdir}/etc/suspend-modules.conf
+}
+md5sums=('fb9dd7f92479348a0fe1a784222e77d1')
diff --git a/suspend-modules b/suspend-modules
new file mode 100644
index 000000000000..17b2118f4690
--- /dev/null
+++ b/suspend-modules
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+case $1 in
+ pre)
+ for mod in $(</etc/suspend-modules.conf); do
+ rmmod $mod
+ done
+ ;;
+ post)
+ for mod in $(</etc/suspend-modules.conf); do
+ modprobe $mod
+ done
+ ;;
+esac