From f7014a2f64d4ec56519f82e90479a1a12daaec1e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Aug 2018 09:06:29 -0400 Subject: hub perms --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index e2acae33..e94aca00 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -1214,6 +1214,11 @@ cubieTruckOneWire = -- My home networked attached storage server. homeNAS :: Property DebianLike homeNAS = propertyList "home NAS" $ props + & Apt.installed ["uhubctl"] + & "/etc/udev/rules.d/52-startech-hub.rules" `File.hasContent` + [ "# let users power control startech hub with uhubctl" + , "ATTR{idVendor}==\"0409\", ATTR{idProduct}==\"005a\", MODE=\"0666\"" + ] & autoMountDrive "archive-10" (USBHubPort 1) (Just "archive-older") & autoMountDrive "archive-11" (USBHubPort 2) (Just "archive-old") & autoMountDrive "archive-12" (USBHubPort 3) (Just "archive") @@ -1227,9 +1232,8 @@ newtype USBHubPort = USBHubPort Int -- -- The hub port is turned on and off automatically as needed, using -- uhubctl. -autoMountDrive :: Mount.Label -> USBHubPort -> Maybe FilePath -> Property DebianLike +autoMountDrive :: Mount.Label -> USBHubPort -> Maybe FilePath -> Property Linux autoMountDrive label (USBHubPort port) malias = propertyList desc $ props - & Apt.installed ["uhubctl"] & File.ownerGroup mountpoint (User "joey") (Group "joey") & File.dirExists mountpoint & case malias of -- cgit v1.2.3