Browse Source

Minor fix for missing /dev/disk/by-id

Maxim Kammerer 12 years ago
parent
commit
85f6cd5f3d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/etc/laptop-mode/laptop-mode.conf

+ 1 - 1
src/etc/laptop-mode/laptop-mode.conf

@@ -40,7 +40,7 @@ DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1
 # For spinning down your hard drives, laptop mode will remount file systems and
 # adjust hard drive spindown timeouts.
 # (copied from /etc/init.d/spindown)
-HD=`find /dev/disk/by-id ! -name '*-part[0-9]*' ! -lname '*/vd*' ! -lname '*/dm-*' -xtype b -exec readlink -f {} \; | sort -u`
+HD=`find /dev/disk/by-id ! -name '*-part[0-9]*' ! -lname '*/dm-*' -xtype b -exec readlink -f {} \; 2>/dev/null | sort -u`
 
 # Use hdparm for /dev/sd*, not sdparm
 ASSUME_SCSI_IS_SATA=1