source: client/shared/scripts/setBootMode @ c21abbc

Last change on this file since c21abbc was 1602040, checked in by ramon <ramongomez@…>, 11 years ago

Versión 1.0.5, #616: Integrar código de la versión 1.0.5 en rama principal.

git-svn-id: https://opengnsys.es/svn/trunk@4309 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 721 bytes
Line 
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
9REPOIP="$(ogGetRepoIp)"
10PORT=2011
11TEMPLATE="/opt/oglive/tftpboot/menu.lst/templates/$1"
12PCNAME="$(hostname)"
13
14PROG="$(basename $0)"
15if [ "$*" == "help" ]; then
16    ogHelp "$PROG" "$PROG template" \
17           "$PROG pxe" \
18           "$PROG 01"
19    exit
20fi
21
22
23# Control básico de errores.
24if [ $# -ne 1 ]; then
25        ogRaiseError $OG_ERR_FORMAT "$MSG_ERR_FORMAT: $PROG TEMPLATE_NAME"
26        exit $?
27fi
28if [ ! -e $TEMPLATE ]; then
29        ogRaiseError $OG_ERR_NOTFOUND "$MSG_ERR_NOTFOUND: $TEMPLATE"
30        exit $?
31fi
32
33hose $REPOIP $PORT --out sh -c "echo -ne SET_CLIENTMODE $1 $PCNAME"
34
35
Note: See TracBrowser for help on using the repository browser.