public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] drop absolute udevadm path
@ 2021-01-25  8:10 Fabian Grünbichler
  2021-01-26 17:29 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2021-01-25  8:10 UTC (permalink / raw)
  To: pve-devel

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 | 3 +--
 PVE/Storage.pm    | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 2552add..57d17f1 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -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";
 	});
diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index bd6e15e..cf309ad 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -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
@@ -1031,8 +1029,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;
     }
 
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied:  [PATCH storage] drop absolute udevadm path
  2021-01-25  8:10 [pve-devel] [PATCH storage] drop absolute udevadm path Fabian Grünbichler
@ 2021-01-26 17:29 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-01-26 17:29 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

On 25.01.21 09:10, Fabian Grünbichler wrote:
> 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 | 3 +--
>  PVE/Storage.pm    | 5 +----
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
>

applied, thanks!

FWIW: The other variables with absolute binary paths should be dropped too.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-26 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  8:10 [pve-devel] [PATCH storage] drop absolute udevadm path Fabian Grünbichler
2021-01-26 17:29 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal