]> git.proxmox.com Git - pve-storage.git/commitdiff
drop absolute udevadm path
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 25 Jan 2021 08:10:38 +0000 (09:10 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Jan 2021 17:27:14 +0000 (18:27 +0100)
the compat symlink from bin to sbin has been dropped with bullseye, and
we rely on PATH begin set properly in our daemons/CLI tools anyway..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/Diskmanage.pm
PVE/Storage.pm

index 116a99a8e9037515ce340df21f45c2692ee18168..9f482af036ef4c5d4b21837e1c862aadc4218f23 100644 (file)
@@ -17,7 +17,6 @@ my $ZPOOL = "/sbin/zpool";
 my $SGDISK = "/sbin/sgdisk";
 my $PVS = "/sbin/pvs";
 my $LVS = "/sbin/lvs";
-my $UDEVADM = "/bin/udevadm";
 my $LSBLK = "/bin/lsblk";
 
 sub verify_blockdev_path {
@@ -312,7 +311,7 @@ sub get_udev_info {
     my $info = "";
     my $data = {};
     eval {
-       run_command([$UDEVADM, 'info', '-p', $dev, '--query', 'all'], outfunc => sub {
+       run_command(['udevadm', 'info', '-p', $dev, '--query', 'all'], outfunc => sub {
            my ($line) = @_;
            $info .= "$line\n";
        });
index 76d17c64d2a95ff1ad7877212c432be0d1a2e8f6..d8197c30596ed3e407cebfa99f4668f8c28d7140 100755 (executable)
@@ -103,8 +103,6 @@ if ( -d '/usr/share/perl5/PVE/Storage/Custom' ) {
 # initialize all plugins
 PVE::Storage::Plugin->init();
 
-my $UDEVADM = '/sbin/udevadm';
-
 our $iso_extension_re = qr/\.(?:iso|img)/i;
 
 #  PVE::Storage utility functions
@@ -1075,8 +1073,7 @@ sub activate_storage {
 
     # only call udevsettle if there are events
     if ($newseq > $cache->{uevent_seqnum}) {
-       my $timeout = 30;
-       system ("$UDEVADM settle --timeout=$timeout"); # ignore errors
+       system ("udevadm settle --timeout=30"); # ignore errors
        $cache->{uevent_seqnum} = $newseq;
     }