diff options
author | Mantas Mikulėnas | 2015-08-08 18:28:14 +0300 |
---|---|---|
committer | Mantas Mikulėnas | 2015-08-08 18:28:24 +0300 |
commit | 4f00aae38f12c8018870b48bfa33be9e63e85c86 (patch) | |
tree | b1ccaffcb06ca046295aba4b5f0a08e62a521087 | |
parent | e2ce7e8f1ec4a6f54e3cd984079995459a5664ce (diff) | |
download | aur-4f00aae38f12c8018870b48bfa33be9e63e85c86.tar.gz |
update for 2015
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rwxr-xr-x | cachefilesd | 49 | ||||
-rw-r--r-- | cachefilesd.service | 10 |
4 files changed, 21 insertions, 57 deletions
@@ -9,9 +9,9 @@ pkgbase = cachefilesd depends = glibc backup = etc/cachefilesd.conf source = http://people.redhat.com/~dhowells/fscache/cachefilesd-0.10.5.tar.bz2 - source = cachefilesd - md5sums = 9e85dd0ace346ff47e188ded8c05ab3b - md5sums = a4f0c47a945f296f120e29f156aea9ba + source = cachefilesd.service + sha256sums = 125ea4f6aef4bf8e936a7cc747b59e074537a8aed74cd1bab3f05d7fbc47287f + sha256sums = 0a76a82184d465cf6a663642557219ea9e2fc18bbe24af2bad55ca61db559c5d pkgname = cachefilesd @@ -1,4 +1,5 @@ -# Maintainer: Rémy Oudompheng <remy@archlinux.org> +# Contributor: Mantas Mikulėnas <grawity@gmail.com> +# Contributor: Rémy Oudompheng <remy@archlinux.org> pkgname=cachefilesd pkgver=0.10.5 @@ -9,10 +10,10 @@ url="http://people.redhat.com/~dhowells/fscache/" license=('GPL') depends=('glibc') source=(http://people.redhat.com/~dhowells/fscache/${pkgname}-${pkgver}.tar.bz2 - cachefilesd) + cachefilesd.service) +sha256sums=('125ea4f6aef4bf8e936a7cc747b59e074537a8aed74cd1bab3f05d7fbc47287f' + '0a76a82184d465cf6a663642557219ea9e2fc18bbe24af2bad55ca61db559c5d') backup=(etc/cachefilesd.conf) -md5sums=('9e85dd0ace346ff47e188ded8c05ab3b' - 'a4f0c47a945f296f120e29f156aea9ba') build() { cd "$pkgname-$pkgver" @@ -22,5 +23,7 @@ build() { package() { cd "$pkgname-$pkgver" make DESTDIR="$pkgdir" install - install -D -m 755 "${srcdir}/cachefilesd" "${pkgdir}/etc/rc.d/cachefilesd" + install -D -m 644 "$srcdir/cachefilesd.service" "$pkgdir/usr/lib/systemd/system/cachefilesd.service" } + +# vim: ts=2:sw=2:et:nowrap diff --git a/cachefilesd b/cachefilesd deleted file mode 100755 index 4624369c9e51..000000000000 --- a/cachefilesd +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -pidfile="/run/cachefilesd.pid" - -get_pid() { - if [ -r "${pid_file}" ]; then - cat "${pid_file}" - else - pgrep -f /sbin/cachefilesd - fi -} - -PID=$(get_pid) - -case "$1" in - start) - stat_busy "Starting cachefilesd" - modprobe cachefiles 2>/dev/null - [[ -z "$PID" ]] && /sbin/cachefilesd -p "$pidfile" - if (( $? > 0 )); then - stat_fail - else - add_daemon cachefilesd - stat_done - fi - ;; - stop) - stat_busy "Stopping cachefilesd" - [[ ! -z "$PID" ]] && kill $PID &> /dev/null - if (( $? > 0 )); then - stat_fail - else - rm -f "$pidfile" - rm_daemon cachefilesd - stat_done - fi - ;; - restart) - $0 stop - sleep 0.5 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/cachefilesd.service b/cachefilesd.service new file mode 100644 index 000000000000..e97dfa6a0400 --- /dev/null +++ b/cachefilesd.service @@ -0,0 +1,10 @@ +[Unit] +Description=CacheFiles Userspace Management Daemon + +[Service] +Type=forking +ExecStartPre=-/usr/bin/modprobe cachefiles +ExecStart=/usr/bin/cachefilesd -f /etc/cachefilesd.conf + +[Install] +WantedBy=multi-user.target |