Skip to content

Commit cf62e3c

Browse files
bspguyfelixradensky
authored andcommitted
hw-mgmt: service: Fix dependency of hw-mgmt-fast-sysfs-monitor service
Since this service is a 'oneshot' type service, Remove dependency with hw-management main service. Also add protection in case directory structure is not ready. Bug: 4439383 Signed-off-by: Roy Cohen <[email protected]>
1 parent d45dff9 commit cf62e3c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

debian/hw-management.hw-management-fast-sysfs-monitor.service

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[Unit]
22
Description=HW management Fast Lables Monitor
3-
Before=hw-management.service
4-
PartOf=hw-management.service
53

64
StartLimitIntervalSec=1200
75
StartLimitBurst=5

usr/usr/bin/hw-management-fast-sysfs-monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ do_start_fast_sysfs_monitor()
6161
log_info "Monitoring ${TOTAL_FILES} files..."
6262
while (( ELAPSED < FAST_SYSFS_MONITOR_TIMEOUT )); do
6363
# Check and add missing devices from devtree_file.
64-
if [ -e "$devtree_file" ] && [[ ${#DEVICE_ADDED[@]} -lt ${#DEV_FILES[@]} ]]; then
64+
if [ -e "$devtree_file" ] && [ -d "$eeprom_path" ] && [[ ${#DEVICE_ADDED[@]} -lt ${#DEV_FILES[@]} ]]; then
6565
# Read the entire content into an array (space-separated tokens).
6666
read -ra DEVTREE_ENTRIES < "$devtree_file"
6767
# Process every 4 tokens as one device entry

0 commit comments

Comments
 (0)