918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[831830f] | 1 | #!/bin/bash |
---|
| 2 | # #/** |
---|
| 3 | # setBootMode |
---|
| 4 | #@brief Script to configure the PXE mode to client |
---|
| 5 | #@param 1 template |
---|
| 6 | #@date 2012-02-2-9 |
---|
| 7 | #*/ ## |
---|
| 8 | |
---|
| 9 | REPOIP="$(ogGetRepoIp)" |
---|
| 10 | PORT=2011 |
---|
| 11 | TEMPLATE="/opt/oglive/tftpboot/menu.lst/templates/$1" |
---|
| 12 | PCNAME="$(hostname)" |
---|
| 13 | |
---|
[32ffd2f] | 14 | PROG="$(basename $0)" |
---|
[831830f] | 15 | if [ "$*" == "help" ]; then |
---|
| 16 | ogHelp "$PROG" "$PROG template" \ |
---|
| 17 | "$PROG pxe" \ |
---|
| 18 | "$PROG 01" |
---|
| 19 | exit |
---|
| 20 | fi |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | # Control básico de errores. |
---|
| 24 | if [ $# -ne 1 ]; then |
---|
| 25 | ogRaiseError $OG_ERR_FORMAT "$MSG_ERR_FORMAT: $PROG TEMPLATE_NAME" |
---|
| 26 | exit $? |
---|
| 27 | fi |
---|
| 28 | if [ ! -e $TEMPLATE ]; then |
---|
| 29 | ogRaiseError $OG_ERR_NOTFOUND "$MSG_ERR_NOTFOUND: $TEMPLATE" |
---|
| 30 | exit $? |
---|
| 31 | fi |
---|
| 32 | |
---|
| 33 | hose $REPOIP $PORT --out sh -c "echo -ne SET_CLIENTMODE $1 $PCNAME" |
---|
| 34 | |
---|
| 35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.