Comment 11 for bug 74394

chourave (gaston72) wrote :

ok Tormod, thank you for patching my linux knowledge !!

Your solution is simpler than mine : I have an additionnal logical condition evaluation to distinguish between the laptop-mode script and the laptop_mode_enable function

if [ x$ENABLE_LAPTOP_MODE = xtrue ]; then
     (sleep 5 && /usr/sbin/laptop_mode auto)&
     (sleep 5 && laptop_mode_enable)&

But , with your patch, the hdparm settings are applied two times :
- first, the default setting :
 $HDPARM -S $SPINDOWN_TIME /dev/$drive 2>/dev/null
 $HDPARM -B 1 /dev/$drive 2>/dev/null
- and then, with the the call to $LAPTOP_MODE start, which use the laptop-mode.conf parameters