]> git.proxmox.com Git - pve-installer.git/commitdiff
less strict regex for matching udev env variables
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 22 Apr 2024 07:42:43 +0000 (09:42 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 23 Apr 2024 08:02:39 +0000 (10:02 +0200)
looking through /usr/lib/udev/rules.d there are at least some which
also have digits (eg. `IEEE1394_...`), so let's just match [^=]+ for
the variable name.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Proxmox/Sys/Udev.pm
proxmox-auto-install-assistant/src/main.rs

index 4554fa41f50cd3d398d369cbe58c55307f2a474a..3213fd4371703918ce6706176f2a910863362ffe 100644 (file)
@@ -3,7 +3,7 @@ package Proxmox::Sys::Udev;
 use strict;
 use warnings;
 
-my $UDEV_REGEX = '^E: ([A-Z_]*)=(.*)$';
+my $UDEV_REGEX = '^E: ([^=]*)=(.*)$';
 
 sub query_udevadm_info {
     my ($sys_path) = @_;
index e6cdca04fc61444a1e12b3d72add59dd224e259b..23bd93778b23c943ad01e89bff046d71a772c4c2 100644 (file)
@@ -414,7 +414,7 @@ fn get_disks() -> Result<BTreeMap<String, BTreeMap<String, String>>> {
     let re_iso9660 = Regex::new(r"(?m)^E: ID_FS_TYPE=iso9660")?;
 
     let re_name = Regex::new(r"(?m)^N: (.*)$")?;
-    let re_props = Regex::new(r"(?m)^E: (.*)=(.*)$")?;
+    let re_props = Regex::new(r"(?m)^E: ([^=]+)=(.*)$")?;
 
     let mut disks: BTreeMap<String, BTreeMap<String, String>> = BTreeMap::new();