[arch-commits] Commit in storage-fixup/trunk (PKGBUILD rc.d.storage-fixup)
Paul Mattal
paul at archlinux.org
Sat Oct 24 03:07:17 UTC 2009
Date: Friday, October 23, 2009 @ 23:07:17
Author: paul
Revision: 56615
upgpkg: storage-fixup 20091023-1
added storage-fixup package
Added:
storage-fixup/trunk/PKGBUILD
storage-fixup/trunk/rc.d.storage-fixup
--------------------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
rc.d.storage-fixup | 28 ++++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
Added: PKGBUILD
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2009-10-24 03:07:17 UTC (rev 56615)
@@ -0,0 +1,42 @@
+# Contributor: Paul Mattal <paul at archlinux.org>
+# Maintainer: Paul Mattal <paul at archlinux.org>
+
+pkgname=storage-fixup
+pkgver=20091023
+pkgrel=1
+pkgdesc="Utility to adjust ATA APM settings to prevent premature drive failure"
+arch=('any')
+url="http://git.kernel.org/?p=linux/kernel/git/tj/storage-fixup.git"
+license=('custom')
+depends=('bash' 'dmidecode' 'hdparm' 'sed')
+makedepends=('git')
+backup=('etc/storage-fixup.conf')
+source=('rc.d.storage-fixup')
+md5sums=('4ab13373e8adc007ea4e0049c7f3ee76')
+
+_gitroot="git://git.kernel.org/pub/scm/linux/kernel/git/tj/storage-fixup.git"
+_gitname="storage-fixup"
+
+build() {
+ cd "$srcdir" || return 1
+ msg "Connecting to GIT server...."
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $_gitroot
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "$srcdir/$_gitname-build" || return 1
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" || return 1
+ cd "$srcdir/$_gitname-build" || return 1
+
+ # INSTALL
+ make DESTDIR="$pkgdir/" install || return 1
+ install -D -m644 LICENSE $startdir/pkg/usr/share/licenses/storage-fixup/LICENSE || return 1
+ install -D -m755 $startdir/src/rc.d.storage-fixup $startdir/pkg/etc/rc.d/storage-fixup || return 1
+}
Added: rc.d.storage-fixup
===================================================================
--- rc.d.storage-fixup (rev 0)
+++ rc.d.storage-fixup 2009-10-24 03:07:17 UTC (rev 56615)
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Running storage-fixup script"
+ /usr/sbin/storage-fixup
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon storage-fixup
+ stat_done
+ fi
+ ;;
+ stop)
+ rm_daemon storage-fixup
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
Property changes on: storage-fixup/trunk/rc.d.storage-fixup
___________________________________________________________________
Added: svn:executable
+ *
More information about the arch-commits
mailing list