mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
add 'echo' command for use in ipmi scripts
This commit is contained in:
parent
aac4cc9e05
commit
36e388648d
@ -215,6 +215,16 @@ ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
|
|
||||||
#endif /* HAVE_READLINE */
|
#endif /* HAVE_READLINE */
|
||||||
|
|
||||||
|
int ipmi_echo_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0; i<argc; i++) {
|
||||||
|
printf("%s ", argv[i]);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ipmi_set_usage(void)
|
ipmi_set_usage(void)
|
||||||
{
|
{
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
extern int ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv);
|
extern int ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
#endif
|
#endif
|
||||||
|
extern int ipmi_echo_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
extern int ipmi_set_main(struct ipmi_intf * intf, int argc, char ** argv);
|
extern int ipmi_set_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
extern int ipmi_exec_main(struct ipmi_intf * intf, int argc, char ** argv);
|
extern int ipmi_exec_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
|
|
||||||
@ -96,13 +97,14 @@ struct ipmi_cmd ipmitool_cmd_list[] = {
|
|||||||
{ ipmi_channel_main, "channel", "Configure Management Controller channels" },
|
{ ipmi_channel_main, "channel", "Configure Management Controller channels" },
|
||||||
{ ipmi_session_main, "session", "Print session information" },
|
{ ipmi_session_main, "session", "Print session information" },
|
||||||
{ ipmi_sunoem_main, "sunoem", "OEM Commands for Sun servers" },
|
{ ipmi_sunoem_main, "sunoem", "OEM Commands for Sun servers" },
|
||||||
{ ipmi_picmg_main, "picmg", "Run a PICMG/ATCA extended cmd"},
|
{ ipmi_picmg_main, "picmg", "Run a PICMG/ATCA extended cmd"},
|
||||||
{ ipmi_fwum_main, "fwum", "Update IPMC using Kontron OEM Firmware Update Manager" },
|
{ ipmi_fwum_main, "fwum", "Update IPMC using Kontron OEM Firmware Update Manager" },
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
{ ipmi_shell_main, "shell", "Launch interactive IPMI shell" },
|
{ ipmi_shell_main, "shell", "Launch interactive IPMI shell" },
|
||||||
#endif
|
#endif
|
||||||
{ ipmi_exec_main, "exec", "Run list of commands from file" },
|
{ ipmi_exec_main, "exec", "Run list of commands from file" },
|
||||||
{ ipmi_set_main, "set", "Set runtime variable for shell and exec" },
|
{ ipmi_set_main, "set", "Set runtime variable for shell and exec" },
|
||||||
|
{ ipmi_echo_main, "echo", NULL }, /* for echoing lines to stdout in scripts */
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user