drop absolute udevadm path
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>
This commit is contained in:
committed by
Thomas Lamprecht
parent
a7e0184190
commit
d3a5e30963
@ -17,7 +17,6 @@ my $ZPOOL = "/sbin/zpool";
|
|||||||
my $SGDISK = "/sbin/sgdisk";
|
my $SGDISK = "/sbin/sgdisk";
|
||||||
my $PVS = "/sbin/pvs";
|
my $PVS = "/sbin/pvs";
|
||||||
my $LVS = "/sbin/lvs";
|
my $LVS = "/sbin/lvs";
|
||||||
my $UDEVADM = "/bin/udevadm";
|
|
||||||
my $LSBLK = "/bin/lsblk";
|
my $LSBLK = "/bin/lsblk";
|
||||||
|
|
||||||
sub verify_blockdev_path {
|
sub verify_blockdev_path {
|
||||||
@ -312,7 +311,7 @@ sub get_udev_info {
|
|||||||
my $info = "";
|
my $info = "";
|
||||||
my $data = {};
|
my $data = {};
|
||||||
eval {
|
eval {
|
||||||
run_command([$UDEVADM, 'info', '-p', $dev, '--query', 'all'], outfunc => sub {
|
run_command(['udevadm', 'info', '-p', $dev, '--query', 'all'], outfunc => sub {
|
||||||
my ($line) = @_;
|
my ($line) = @_;
|
||||||
$info .= "$line\n";
|
$info .= "$line\n";
|
||||||
});
|
});
|
||||||
|
|||||||
@ -103,8 +103,6 @@ if ( -d '/usr/share/perl5/PVE/Storage/Custom' ) {
|
|||||||
# initialize all plugins
|
# initialize all plugins
|
||||||
PVE::Storage::Plugin->init();
|
PVE::Storage::Plugin->init();
|
||||||
|
|
||||||
my $UDEVADM = '/sbin/udevadm';
|
|
||||||
|
|
||||||
our $iso_extension_re = qr/\.(?:iso|img)/i;
|
our $iso_extension_re = qr/\.(?:iso|img)/i;
|
||||||
|
|
||||||
# PVE::Storage utility functions
|
# PVE::Storage utility functions
|
||||||
@ -1075,8 +1073,7 @@ sub activate_storage {
|
|||||||
|
|
||||||
# only call udevsettle if there are events
|
# only call udevsettle if there are events
|
||||||
if ($newseq > $cache->{uevent_seqnum}) {
|
if ($newseq > $cache->{uevent_seqnum}) {
|
||||||
my $timeout = 30;
|
system ("udevadm settle --timeout=30"); # ignore errors
|
||||||
system ("$UDEVADM settle --timeout=$timeout"); # ignore errors
|
|
||||||
$cache->{uevent_seqnum} = $newseq;
|
$cache->{uevent_seqnum} = $newseq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user