Comment 7 for bug 1293152

Unless I'm missing something, I don't think the fix here was fully successful. In the case of a VMware VM running 14.04, hdparm spits out a sense data error on stderr:

# hdparm -I /dev/sda1 1>/dev/null
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

So, fstrim-all also spits this out on stderr which then gets sent to root's mail by cron.weekly:

# /sbin/fstrim-all 1>/dev/null
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

It looks like the intent was to have the stderr of hdparm piped to /dev/null, but this isn't inside the backticks in the fstrim-all script. To fix this, I think we just need the attached trivial patch.

This is mostly just an annoyance, but it would be nice to get fixed. If it makes more sense to open this as a new bug, let me know.