The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Useful Scripts
2012-06-20, 15:23
Post: #1
Wink Useful Scripts
show_all_variables.ipxe
=================

Description: will show all (or most) variables (List: http://ipxe.org/cfg) currently assigned or inherited by the dhcp server, perfect when testing, saved me a bunch of time... It is formatted to fill exactly the full page, and show the dhcp option id when it exists.

Code:
#!ipxe
# Made by ZeroQI
# PXE error codes        http://h18013.www1.hp.com/products/servers/management/rdp/knowledgebase/00000138.html
# Ascii to Hec convertor http://easycalculation.com/ascii-hex.php
#In the same way that option 43 is an option space containing vendor-encapsulated options,
# gPXE/iPXE uses option 175 to contain gPXE-specific encapsulated options.

:first_page
echo Client Fields___ Option_ Value_________________________________________________
echo manufacturer.... ....... ${manufacturer}
echo product......... ....... ${product}
echo serial.......... ....... ${serial}
echo asset........... ....... ${asset}
echo mac............. ....... ${mac}
echo uuid............ 097.... ${uuid}
echo busid........... 175.177 ${busid}#can be used to chainload
echo user class...... 077.... ${user-class}
echo
echo DHCP Fields_____ Option_ Value_________________________________________________
echo dhcp-server..... 054.... ${dhcp-server}
echo domain.......... 015.... ${domain}
echo hostname........ 012.... ${hostname}
echo ip.............. 050.... ${ip}
echo netmask......... 001.... ${netmask}
echo gateway......... 003.... ${gateway}
echo dns............. 006.... ${dns}
echo syslog.......... 007.... ${7:ipv4} / "${syslog}" (if support compiled)
echo ntp-server...... 042.... ${42:ipv4}
echo
echo next-server..... 066.... ${next-server}
echo filename........ 067.... ${filename}
echo
prompt Press any key to continue...

:second_page
echo DHCP options____ Option_ Value_________________________________________________
echo priority........ 175.001 ${priority:hex}
echo no-pxedhcp...... 175.176 ${175.176:hex}
echo use-cached...... 175.178 ${use-cached:hex}
echo scriptlet....... 175.081 ${scriptlet}
echo bios-drive...... 175.189 ${189}#what is this for???
echo version-code.... 175.235 ${235}#what is this for???
echo
echo San settings____ Option_ Value_________________________________________________
echo keep-san........ 175.008 ${keep-san:hex}
echo skip-san-boot... 175.009 ${skip-san-boot}
echo root-path....... 017.... ${root-path}    #iscsi:<servername (domain name, ipv4)>:[protocol (6)]:[port (3260)]:[LUN (0)]:<targetname (IQN)>
echo initiator-iqn... 203.... ${initiator-iqn}    #iscsi:my.target.dns.name::::iqn.2007-08.name.dns.target.my:iscsiboot #[Serva32/64 forbid ascii use]
echo
echo Authenticaition_ Option_ Value_________________________________________________
echo username........ 175.190 ${username}        
echo password........ 175.191 ${password}
echo reverse-username 175.192 ${reverse-username}
echo reverse-password 175.193 ${reverse-password}
echo
echo
echo
echo
echo
#Go in windows character map, select system font, 0x100+ascii code for letter in key.h [ http://git.ipxe.org/ipxe.git/blob/HEAD:/src/include/ipxe/keys.h ]
prompt --key 0x141 Press UP to go back to the first page or any other key to continue... && goto first_page ||    #UP
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Useful Scripts - ZeroQI - 2012-06-20 15:23
RE: Useful Scripts - robinsmidsrod - 2012-06-27, 08:03
RE: Useful Scripts - ZeroQI - 2012-06-27, 10:16
Speed_test.ipxe - ZeroQI - 2012-06-28, 09:13



User(s) browsing this thread: 1 Guest(s)