Skip to contentSkip to conversation

cluster/fence/agents/ipmilan ipmilan.c

Cluster-devel [email protected] 1 participant 1 message Jan 29, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: rohara at sourceware.org 2007-01-29 20:43:47

Modified files:
fence/agents/ipmilan: ipmilan.c

Log message:
If no password is specified, pass a "-P ''" to the ipmitool to prevent it from prompting for a password.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ipmilan/ipmilan.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.2.6.3&r2=1.1.2.2.6.4

fence/agents/ipmilan/ipmilan.c +3 -0
@@ -191,6 +191,9 @@
 	if (ipmi->i_password) {
 		snprintf(arg, sizeof(arg), " -P %s", ipmi->i_password);
 		strncat(cmd, arg, sizeof(cmd) - strlen(arg));
+	} else {
+		snprintf(arg, sizeof(arg), " -P ''");
+		strncat(cmd, arg, sizeof(cmd) - strlen(arg));
 	}
 
 	/* Tack on the -v flags for ipmitool; in most cases, i_verbose