====== Prompt user to enter configuration setting ====== ===== Synopsis ===== read [--timeout ] ===== Examples ===== === Prompt user to enter boot filename === read filename === Allow user to configure an IP address for the interface "net0" === echo -n IP address: && read net0/ip echo -n Subnet mask: && read net0/netmask echo -n Default gateway: && read net0/gateway === Allow user to edit a kernel command line before booting === set cmdline selinux=0 console=ttyS0,115200n8 console=tty0 echo -n Kernel command line: ${} read cmdline chain http://my.web.server/vmlinuz ${cmdline} ===== Description ===== Set value of the specified configuration [[:settings|setting]] to the value provided by the user, waiting for the specified timeout (in milliseconds). If no timeout is explicitly specified, or if a zero timeout is specified, then iPXE will wait indefinitely. The value will be interpreted according to the type specified as part of the setting name. For example, to prompt the user to enter a configuration setting for an NTP server address (DHCP option 42): read 42:ipv4 If no type is explicitly specified, then the setting's default type will be used. ===== Command status ===== ^ Success | The configuration setting was applied successfully | ^ Failure | The configuration setting was not applied successfully, or no key was pressed within the timeout period | ===== See also ===== * ''[[:cmd:show]]'' * ''[[:cmd:set]]'' * ''[[:cmd:clear]]'' * ''[[:cmd:config]]'' * ''[[:cmd:present]'' * ''[[:cmd:login]]'' * [[:cfg|List of all iPXE settings]] * [[:cmd|List of all iPXE commands]] ===== Notes ===== You can use the ''[[:cmd:config]]'' command to browse and edit all predefined settings interactively. You can add a trailing space after a prompt string printed using the ''[[:cmd:echo]]'' command by adding an empty variable ''${}'' to the end of the prompt string. For example: iPXE> echo -n IP address: ${} && read net0/ip IP address: 192.168.0.1 You can use the ''[[:cmd:present]]'' command to present the user with an interactive form to edit your selection of settings. You can use the ''[[:cmd:login]]'' command to prompt the user to enter a user name and password (without displaying the password on-screen).