Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 247999 Details for
Bug 334435
app-laptop/hdapsd-20090401-r1 add support of removable disk to init script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
The initial script for hdapsd services
hdapsd.init (text/plain), 1.42 KB, created by
Weihua Zhou
on 2010-09-19 14:04:25 UTC
(
hide
)
Description:
The initial script for hdapsd services
Filename:
MIME Type:
Creator:
Weihua Zhou
Created:
2010-09-19 14:04:25 UTC
Size:
1.42 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License, v2 > >depend() { > need localmount >} > >checkconfig() { > if [[ -z ${DISKLIST} || -z ${THRESHOLD} ]] ; then > eerror "You should setup DISK and THRESHOLD in /etc/conf.d/hdapsd." > return 1 > fi > > for DISK in ${DISKLIST} > do > 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" > return 1 > fi > done > > # Load the tp_smapi module first > # This is not a requirement, but it helps hdapsd adaptive mode > if [[ ! -e /sys/devices/platform/smapi ]] ; then > modprobe tp_smapi 2>/dev/null > fi > > if [[ ! -d /sys/devices/platform/hdaps ]]; then > ebegin "Loading hdaps module" > modprobe hdaps > eend $? || return 1 > fi >} > >start() { > checkconfig || return 1 > > DEVPARM="" > for DISK in ${DISKLIST} > do > DEVPARM=${DEVPARM}"-d "${DISK}" " > done > ebegin "Starting Hard Drive Active Protection System daemon" > start-stop-daemon --start --exec /usr/sbin/hdapsd \ > --pidfile /var/run/hdapsd.pid \ > -- -b -p ${DEVPARM} -s "${THRESHOLD}" ${OPTIONS} > eend $? >} > >stop() { > ebegin "Stopping Hard Drive Active Protection System daemon" > start-stop-daemon --stop --exec /usr/sbin/hdapsd \ > --pidfile /var/run/hdapsd.pid > eend $? >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 334435
:
247998
| 247999 |
296605
|
296659