Index: doc/freeipmi.texi =================================================================== RCS file: /cvsroot/freeipmi/freeipmi/doc/freeipmi.texi,v retrieving revision 1.7 diff -r1.7 freeipmi.texi 55a56 > * bmc-autoconfig:: Wizard-like frontend for bmc-config. 905c906 < @node bmc-info, ipmi-sensors, bmc-config, Top --- > @node bmc-info, bmc-autoconfig, bmc-config, Top 947c948,967 < @node ipmi-sensors, ipmi-sel, bmc-info, Top --- > @node bmc-autoconfig, ipmi-sensors, bmc-info, Top > @chapter bmc-autoconfig > @pindex bmc-autoconfig > @command{bmc-autoconfig} utility is a wizard-like frontend to the > @command{bmc-config} command, which has a curses/text based interfaced > questionaire asking for IP/Netmask/Gateway to be committed. > > @section Command-line options > @itemize @bullet > @item -u, --usage @* > Show short usage message. > > @item -h, --help @* > Show help. > > @item -V, --version @* > Show version information. > @end itemize > > @node ipmi-sensors, ipmi-sel, bmc-autoconfig, Top Index: fish/scripts/bmc-autoconfig/bmc-autoconfig =================================================================== RCS file: /cvsroot/freeipmi/freeipmi/fish/scripts/bmc-autoconfig/bmc-autoconfig,v retrieving revision 1.1 diff -r1.1 bmc-autoconfig 26a27,30 > VERSION="0.1"; > ME=$(basename ${0}); > SUPPORT_EMAIL="address@hidden"; > DESCRIPTION="${ME} is an autoconfiguration tool and wrapper around bmc-config" 30c34 < BMC_CONFIG=$(which bmc-config 2>/dev/null) || { --- > BMC_CONFIG=$(which echo 2>/dev/null) || { 34a39 > 75c80 < echo "${oct}" | grep -Eq "^[0-9\.]+$" || { --- > echo "${quad}" | grep -Eq "^[0-9\.]+$" || { 140,147c145,183 < ip=$(accept_input get_ip_address validate_ip_address) && < nm=$(accept_input get_netmask validate_ip_address) && < gw=$(accept_input get_gateway_ip_address validate_ip_address) && { < ${BMC_CONFIG} --commit -f "${TEMPLATE}"; < ${BMC_CONFIG} --commit -k "Lan_Conf:IP_Address=${ip}"; < ${BMC_CONFIG} --commit -k "Lan_Conf:Subnet_Mask=${nm}"; < ${BMC_CONFIG} --commit -k "Lan_Conf:Default_Gateway_IP_Address=${gw}"; < } --- > case "${1}" in > '--usage'|'-u') > cat < Usage: ${ME} [-?V] [--help] [--usage] [--version] > EOF > ;; > '--help'|'-h') > cat < Usage: ${ME} [OPTION...] > ${DESCRIPTION} > > -h, --help Give this help list > -u, --usage Give a short usage message > -V, --version Print program version > > Report bugs to ${SUPPORT_EMAIL} > EOF > ;; > '--version'|'-V') > echo ${ME} ${VERSION}; > ;; > '') > ip=$(accept_input get_ip_address validate_ip_address) && > nm=$(accept_input get_netmask validate_ip_address) && > gw=$(accept_input get_gateway_ip_address validate_ip_address) && { > ${BMC_CONFIG} --commit -f "${TEMPLATE}"; > ${BMC_CONFIG} --commit -k "Lan_Conf:IP_Address=${ip}"; > ${BMC_CONFIG} --commit -k "Lan_Conf:Subnet_Mask=${nm}"; > ${BMC_CONFIG} --commit -k "Lan_Conf:Default_Gateway_IP_Address=${gw}"; > } > ;; > *) > cat < ${ME}: invalid option -- ${1} > Try \`${ME} --help' or \`${ME} --usage' for more information. > EOF > > esac >