From 9534ff7dc0a1baca43309adb1a749c9c0e74de5b Mon Sep 17 00:00:00 2001 From: lr1980 Date: Sat, 2 Aug 2014 22:59:19 +0200 Subject: [PATCH] Update powered_up_ add optional use of "/dev/disk/by-id" --- plugins/harddisks/powered_up_ | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/harddisks/powered_up_ b/plugins/harddisks/powered_up_ index 1e22729d..634d3365 100755 --- a/plugins/harddisks/powered_up_ +++ b/plugins/harddisks/powered_up_ @@ -2,7 +2,10 @@ #%# family=auto #%# capabilities=autoconf suggest -device=`echo $0 | cut -d _ -f 3` +device=`basename $0 | sed 's/^powered_up_//g'` +if [ ! -e /dev/$device ]; then + device="disk/by-id/$device" +fi case $1 in config)