summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Bangert <bangert@gentoo.org>2009-10-16 11:57:43 +0000
committerThilo Bangert <bangert@gentoo.org>2009-10-16 11:57:43 +0000
commit9ebec98567bae65c7e305d28ed9c74697fa19eda (patch)
treecad7bf2a6e2066237c0a665ae79dd0fe6e77f1d3 /app-laptop/hdapsd
parentmake it work for newer kernels (bug #254322) - eapi 2 - add IUSE (diff)
downloadgentoo-2-9ebec98567bae65c7e305d28ed9c74697fa19eda.tar.gz
gentoo-2-9ebec98567bae65c7e305d28ed9c74697fa19eda.tar.bz2
gentoo-2-9ebec98567bae65c7e305d28ed9c74697fa19eda.zip
warn if non-existing hdd has been configured
(Portage version: 2.2_rc42/cvs/Linux i686)
Diffstat (limited to 'app-laptop/hdapsd')
-rw-r--r--app-laptop/hdapsd/ChangeLog5
-rw-r--r--app-laptop/hdapsd/files/hdapsd.init6
2 files changed, 10 insertions, 1 deletions
diff --git a/app-laptop/hdapsd/ChangeLog b/app-laptop/hdapsd/ChangeLog
index 815e51916b57..59eeb3b2e386 100644
--- a/app-laptop/hdapsd/ChangeLog
+++ b/app-laptop/hdapsd/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for app-laptop/hdapsd
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.12 2009/10/14 22:03:26 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.13 2009/10/16 11:57:42 bangert Exp $
+
+ 16 Oct 2009; Thilo Bangert <bangert@gentoo.org> files/hdapsd.init:
+ warn if non-existing hdd has been configured
*hdapsd-20090401 (14 Oct 2009)
diff --git a/app-laptop/hdapsd/files/hdapsd.init b/app-laptop/hdapsd/files/hdapsd.init
index ef146ee296a9..a4bb824a35d3 100644
--- a/app-laptop/hdapsd/files/hdapsd.init
+++ b/app-laptop/hdapsd/files/hdapsd.init
@@ -12,6 +12,12 @@ checkconfig() {
return 1
fi
+ if [ ! -f /dev/${DISK} ]; then
+ eerror "Could not find disk /dev/${DISK}!"
+ eerror "Adjust teh DISK setting in /etc/conf.d/hdapsd"
+ return 1
+ fi
+
if [[ ! -e /sys/block/${DISK}/queue/protect ]] && [[ ! -e /sys/block/${DISK}/device/unload_heads ]] ; then
eerror "No protect entry for ${DISK}!"
eerror "Make sure your kernel is patched with the blk_freeze patch"