Descargar Imprimir esta página

HP ProLiant DL580 Gen8 Guía De Usuario página 71

Uefi shell para servidores

Publicidad

Ejemplos de secuencias de comandos de Shell
Ejemplos
Los siguientes ejemplos de secuencias de comandos muestran cómo capturar una configuración
(exportar) para replicarla (importar) desde el archivo startup.nsh montado en un soporte virtual
de iLO.
Ejemplo de exportación:
fs0:\>
@echo -off
cls
set -v myfs 0
if exist FS0:\* then
FS0:
echo "FS0:\ Found!"
goto FSFOUND
endif
echo "FS0:\ not found in system"
echo "Going to search first available file system from FS1, FS2,..., FS100"
pause
for %a run (1 100)
set -v myfs %a
if exist FS%myfs%:\* then
FS%myfs%:
echo "FS%myfs%:\ Found!"
goto FSFOUND
endif
endfor
## No valid FS found in system, so exit now
echo "No valid File System (FS0, FS1,..., FS100) found in system"
goto END
:FSFOUND
if exist sysconfig_backup.txt then
echo ===========================================================================
echo "%cwd%sysconfig_backup.txt already exists! Continuing the execution of the"
echo "script will remove existing sysconfig_backup.txt file and create a new"
echo "latest system configuration sysconfig_backup.txt file."
echo ===========================================================================
pause
rm sysconfig_backup.txt
endif
echo "Saving latest system configuration in sysconfig_backup.txt file."
sysconfig -export sysconfig_backup.txt
:END
set -d myfs
Ejemplo de importación:
fs0:\>
@echo -off
cls
set -v myfs 0
if exist FS0:\sysconfig_backup.txt then
FS0:
echo "FS0:\sysconfig_backup.txt Found!"
goto FSFOUND
endif
echo ===========================================================================
echo "FS0:\sysconfig_backup.txt not found in system"
echo "Going to search sysconfig_backup.txt from all available file system"
echo "from FS1, FS2,..., FS100"
echo ===========================================================================
pause
for %a run (1 100)
set -v myfs %a
Ejemplos de secuencias de comandos de Shell
71

Publicidad

loading