fix: nas leds and disks
This commit is contained in:
@@ -30,8 +30,6 @@
|
|||||||
mdadmConf = ''
|
mdadmConf = ''
|
||||||
DEVICE /dev/disk/by-id/nvme-KIOXIA-EXCERIA_PLUS_G3_SSD_7FJKS1MAZ0E7-part1
|
DEVICE /dev/disk/by-id/nvme-KIOXIA-EXCERIA_PLUS_G3_SSD_7FJKS1MAZ0E7-part1
|
||||||
DEVICE /dev/disk/by-id/nvme-KIOXIA-EXCERIA_PLUS_G3_SSD_7FJKS1M9Z0E7-part1
|
DEVICE /dev/disk/by-id/nvme-KIOXIA-EXCERIA_PLUS_G3_SSD_7FJKS1M9Z0E7-part1
|
||||||
DEVICE /dev/disk/by-id/ata-ST18000NM000J-2TV103_ZR52TBSB-part1
|
|
||||||
DEVICE /dev/disk/by-id/ata-ST18000NM000J-2TV103_ZR52V9QX-part1
|
|
||||||
DEVICE /dev/disk/by-id/ata-TOSHIBA_MG10ACA20TE_8582A01SF4MJ-part1
|
DEVICE /dev/disk/by-id/ata-TOSHIBA_MG10ACA20TE_8582A01SF4MJ-part1
|
||||||
DEVICE /dev/disk/by-id/ata-TOSHIBA_MG10ACA20TE_75V2A0H3F4MJ-part1
|
DEVICE /dev/disk/by-id/ata-TOSHIBA_MG10ACA20TE_75V2A0H3F4MJ-part1
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
# Toshiba 20TB NAS drives - same settings
|
# Toshiba 20TB NAS drives - same settings
|
||||||
ACTION=="add", KERNEL=="sd[a-z]", SUBSYSTEM=="block", \
|
ACTION=="add", KERNEL=="sd[a-z]", SUBSYSTEM=="block", \
|
||||||
ATTRS{model}=="TOSHIBA MG10ACA20TE*", \
|
ATTRS{model}=="TOSHIBA MG10ACA2*", \
|
||||||
RUN+="${pkgs.hdparm}/bin/hdparm -B 127 -S 180 /dev/%k"
|
RUN+="${pkgs.hdparm}/bin/hdparm -B 127 -S 180 /dev/%k"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
# Disk mapping: ata port -> LED name
|
# Disk mapping: ata port -> LED name
|
||||||
# DXP4800 has bays 1-4, currently bays 2 and 4 are populated
|
# DXP4800 has bays 1-4, all populated
|
||||||
diskMapping = {
|
diskMapping = {
|
||||||
# ata-2 (sdb) -> disk2
|
"1" = "disk1";
|
||||||
"2" = "disk2";
|
"2" = "disk2";
|
||||||
# ata-4 (sdc) -> disk4
|
"3" = "disk3";
|
||||||
"4" = "disk4";
|
"4" = "disk4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
diff --git a/src/pyload/core/__init__.py b/src/pyload/core/__init__.py
|
|
||||||
index 4324fc700..5d915a85e 100644
|
|
||||||
--- a/src/pyload/core/__init__.py
|
--- a/src/pyload/core/__init__.py
|
||||||
+++ b/src/pyload/core/__init__.py
|
+++ b/src/pyload/core/__init__.py
|
||||||
@@ -130,6 +130,14 @@ class Core:
|
@@ -130,6 +130,14 @@ class Core:
|
||||||
@@ -17,12 +15,13 @@ index 4324fc700..5d915a85e 100644
|
|||||||
# If no argument set, read storage dir from config file,
|
# If no argument set, read storage dir from config file,
|
||||||
# otherwise save setting to config dir
|
# otherwise save setting to config dir
|
||||||
if storagedir is None:
|
if storagedir is None:
|
||||||
@@ -227,6 +235,18 @@ class Core:
|
@@ -226,6 +234,20 @@ class Core:
|
||||||
|
self.acm = self.account_manager = AccountManager(self)
|
||||||
self.thm = self.thread_manager = ThreadManager(self)
|
self.thm = self.thread_manager = ThreadManager(self)
|
||||||
self.cpm = self.captcha_manager = CaptchaManager(self)
|
self.cpm = self.captcha_manager = CaptchaManager(self)
|
||||||
self.adm = self.addon_manager = AddonManager(self)
|
|
||||||
+
|
+
|
||||||
+ # Process plugin config environment variables after plugins are loaded (NixOS declarative config)
|
+ # Process plugin config environment variables BEFORE AddonManager (NixOS declarative config)
|
||||||
|
+ # This must happen before AddonManager reads the enabled flag to decide which addons to start
|
||||||
+ # Build case-insensitive lookup map for plugin names
|
+ # Build case-insensitive lookup map for plugin names
|
||||||
+ plugin_name_map = {name.lower(): name for name in self.config.plugin.keys()}
|
+ plugin_name_map = {name.lower(): name for name in self.config.plugin.keys()}
|
||||||
+
|
+
|
||||||
@@ -33,6 +32,7 @@ index 4324fc700..5d915a85e 100644
|
|||||||
+ if len(parts) == 2 and parts[0] in plugin_name_map:
|
+ if len(parts) == 2 and parts[0] in plugin_name_map:
|
||||||
+ actual_plugin_name = plugin_name_map[parts[0]]
|
+ actual_plugin_name = plugin_name_map[parts[0]]
|
||||||
+ self.config.set_plugin(actual_plugin_name, parts[1], value)
|
+ self.config.set_plugin(actual_plugin_name, parts[1], value)
|
||||||
|
+
|
||||||
|
self.adm = self.addon_manager = AddonManager(self)
|
||||||
|
|
||||||
def _setup_permissions(self):
|
def _setup_permissions(self):
|
||||||
self.log.debug("Setup permissions...")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user