summaryrefslogtreecommitdiffstats
path: root/extras/updategrubprofile
diff options
context:
space:
mode:
Diffstat (limited to 'extras/updategrubprofile')
-rw-r--r--extras/updategrubprofile14
1 files changed, 14 insertions, 0 deletions
diff --git a/extras/updategrubprofile b/extras/updategrubprofile
new file mode 100644
index 0000000..f2c83e2
--- /dev/null
+++ b/extras/updategrubprofile
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+[ $# -gt 1 ] && exit 1
+source "$1" || exit 1
+
+# Obtener directorio ogLive a partir de los datos.
+OGLIVEDIR=$(echo "$DATA" | awk -F= 'BEGIN {RS=" "} $1=="oglivedir" {print $2}')
+
+# Elimina "oglivedir" de los parametros si ya esta en la plantilla.
+if grep -q "oglivedir=" ${TEMPLATE_PATH} 2>/dev/null; then
+ DATA="${DATA/oglivedir=$OGLIVEDIR/}"
+fi
+
+sed -e "s,vga=[0-9]*,,g; s,INFOHOST,${DATA//,/\\,},g; s,set ISODIR=.*,set ISODIR=$OGLIVEDIR,g" ${TEMPLATE_PATH} >${PXEFILE_PATH}