Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 334435 | Differences between
and this patch

Collapse All | Expand All

(-)hdapsd.init (-9 / +11 lines)
Lines 12-26 Link Here
12
	return 1
12
	return 1
13
    fi
13
    fi
14
14
15
    if [ ! -b /dev/${DISK} ]; then
15
    for disk in ${DISK}; do
16
	eerror "Could not find disk /dev/${DISK}!"
16
        if [[ -b /dev/$disk ]] && [[ -e /sys/block/$disk/device/unload_heads ]]; then
17
	eerror "Adjust the DISK setting in /etc/conf.d/hdapsd"
17
          DISKOPTS+="-d $disk "
18
	return 1
18
	else
19
    fi
19
	  ewarn "$disk from DISKS does not exist or does not support unload feature"
20
	fi
21
    done
20
22
21
    if [[ ! -e /sys/block/${DISK}/queue/protect ]] && [[ ! -e /sys/block/${DISK}/device/unload_heads ]] ; then
23
    if [[ -z ${DISKOPTS} ]]; then
22
	eerror "No protect entry for ${DISK}!"
24
        eerror "Could not find any of the disks!"
23
	eerror "Make sure your kernel is patched with the blk_freeze patch"
25
        eerror "Adjust the DISK setting in /etc/conf.d/hdapsd"
24
	return 1
26
	return 1
25
    fi
27
    fi
26
28
Lines 43-49 Link Here
43
    ebegin "Starting Hard Drive Active Protection System daemon"
45
    ebegin "Starting Hard Drive Active Protection System daemon"
44
    start-stop-daemon --start --exec /usr/sbin/hdapsd \
46
    start-stop-daemon --start --exec /usr/sbin/hdapsd \
45
	--pidfile /var/run/hdapsd.pid \
47
	--pidfile /var/run/hdapsd.pid \
46
	-- -b -p -d "${DISK}" -s "${THRESHOLD}" ${OPTIONS}
48
	-- -b -p ${DISKOPTS} -s "${THRESHOLD}" ${OPTIONS}
47
    eend $?
49
    eend $?
48
}
50
}
49
	
51
	

Return to bug 334435