robbat2 14/12/29 00:12:01 Added: freefall.confd freefall.initd Log: Bump. (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
Revision Changes Path 1.1 sys-apps/linux-misc-apps/files/freefall.confd file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/files/freefall.confd?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/files/freefall.confd?rev=1.1&content-type=text/plain Index: freefall.confd =================================================================== # /etc/conf.d/freefall # The name of the disk device that hpfall should protect. # Usually this is 'sda' or 'hda' the primary master. DISK="sda" 1.1 sys-apps/linux-misc-apps/files/freefall.initd file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/files/freefall.initd?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/linux-misc-apps/files/freefall.initd?rev=1.1&content-type=text/plain Index: freefall.initd =================================================================== #!/sbin/runscript # Copyright 2012-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-apps/linux-misc-apps/files/freefall.initd,v 1.1 2014/12/29 00:12:01 robbat2 Exp $ checkconfig() { if [ -z "$DISK" ] ; then eerror "You need to setup DISK in /etc/conf.d/freefall first" return 1 fi if [ ! -b /dev/${DISK} ]; then eerror "Could not find disk /dev/${DISK}!" eerror "Adjust the DISK setting in /etc/conf.d/freefall" return 1 fi if [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then eerror "No protect entry for ${DISK}!" eerror "Kernel 2.6.28 and above is required" return 1 fi if [ ! -c /dev/freefall ]; then ebegin "Loading hp_accel module" modprobe hp_accel eend $? || return 1 fi } start () { checkconfig || return 1 ebegin "Starting active hard-drive protection daemon" start-stop-daemon --start --quiet \ --exec /usr/sbin/freefall /dev/${DISK} eend $? } stop() { ebegin "Stopping active hard-drive protection daemon" start-stop-daemon --stop --quiet \ --exec /usr/sbin/freefall eend $? }
