summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific
diff options
context:
space:
mode:
authorJoey Hess2020-07-04 14:09:31 -0400
committerJoey Hess2020-07-04 14:12:03 -0400
commite1bbd9b1e5fb660f92103173e1fc6206c8158249 (patch)
tree5c19632e8fd8901e5cab90231451c26821e23f93 /src/Propellor/Property/SiteSpecific
parent34fe47db84d7a31d146ab09f81b679708b8927c8 (diff)
improve horrible lstree parser
Diffstat (limited to 'src/Propellor/Property/SiteSpecific')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 5c4bf569..64bee99d 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -1321,7 +1321,7 @@ autoMountDrivePort label hp drive malias = propertyList desc $ props
-- drive lsusb to find that. This works even if the
-- port is powered off, as long as it's been on at
-- some point before.
- [ "$(lsusb -tvv | perl -lne \"if (m!/sys/bus/usb/devices/(.*?) !) {\\\\$v=\\\\$1}; if (/"
+ [ "$(lsusb -tvv | perl -lne \"if (\\\\$h && m!/sys/bus/usb/devices/(.*?) !) {\\\\$v=\\\\$1}; if (m/Hub/) { \\\\$h=1 } else { \\\\$h=0 }; if (/"
, driveVendorId drive ++ ":" ++ driveProductId drive
++ "/) { print \\\\$v; last}\")"
]