Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

eio_cli: Allow udev rules to use device name only if no device uuid found #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CLI/eio_cli
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ def make_udev_match_expr(dev_path, cache_name):
match_expr= 'ENV{DM_NAME}!="' + cache_name + \
'", ENV{ID_FS_UUID}=="' + dict_udev["ID_FS_UUID"] + '"'
return match_expr

# Fall through, use device names only
if dict_udev["DEVTYPE"] == "disk":
match_expr='KERNEL=="'+ dev_path.split('/')[-1] + \
'", ENV{DEVTYPE}=="'+ dict_udev["DEVTYPE"] +'"'
return match_expr


def run_cmd(cmd):
Expand Down