[pve-devel] [PATCH cluster 2/2] pvecm: qdevice: adjust line lengths

Aaron Lauterer a.lauterer at proxmox.com
Wed May 15 12:32:13 CEST 2024


The first instance had the line break mid array. It now is a bit over
the limit, but follows the style guide closely: putting each argument to
the function in a newline.

Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 src/PVE/CLI/pvecm.pm | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/PVE/CLI/pvecm.pm b/src/PVE/CLI/pvecm.pm
index 5c285a9..53e9cac 100755
--- a/src/PVE/CLI/pvecm.pm
+++ b/src/PVE/CLI/pvecm.pm
@@ -210,10 +210,10 @@ __PACKAGE__->register_method ({
 	    my ($node, $ip) = @_;
 	    my $ssh_options = PVE::SSHInfo::ssh_info_to_ssh_opts ({ ip => $ip, name => $node });
 	    my $outsub = sub { print "\nnode '$node': " . shift };
-	    run_command([
-		    @$ssh_cmd, @$ssh_options, $ip, "$qdevice_certutil", "-m", "-c",
-		    "/etc/pve/$p12_file_base"], outfunc => \&$outsub
-		);
+	    run_command(
+		[@$ssh_cmd, @$ssh_options, $ip, "$qdevice_certutil", "-m", "-c", "/etc/pve/$p12_file_base"],
+		outfunc => \&$outsub
+	    );
 	});
 	unlink "/etc/pve/$p12_file_base";
 
@@ -249,8 +249,14 @@ __PACKAGE__->register_method ({
 	    my $ssh_options = PVE::SSHInfo::ssh_info_to_ssh_opts ({ ip => $ip, name => $node });
 	    my $outsub = sub { print "\nnode '$node': " . shift };
 	    print "\nINFO: start and enable corosync qdevice daemon on node '$node'...\n";
-	    run_command([@$ssh_cmd, @$ssh_options, $ip, 'systemctl', 'start', 'corosync-qdevice'], outfunc => \&$outsub);
-	    run_command([@$ssh_cmd, @$ssh_options, $ip, 'systemctl', 'enable', 'corosync-qdevice'], outfunc => \&$outsub);
+	    run_command(
+		[@$ssh_cmd, @$ssh_options, $ip, 'systemctl', 'start', 'corosync-qdevice'],
+		outfunc => \&$outsub
+	    );
+	    run_command(
+		[@$ssh_cmd, @$ssh_options, $ip, 'systemctl', 'enable', 'corosync-qdevice'],
+		outfunc => \&$outsub
+	    );
 	});
 
 	run_command(['corosync-cfgtool', '-R']); # do cluster wide config reload
-- 
2.39.2





More information about the pve-devel mailing list