summaryrefslogtreecommitdiffstats
path: root/server/bin/setserveraddr
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-03-14 13:16:10 +0000
committerramon <ramongomez@us.es>2016-03-14 13:16:10 +0000
commite0314d935aea21bf9c74861baa6d0f84151504cf (patch)
treeb99a4fe2120583ab302ba98370da05be28a5ad77 /server/bin/setserveraddr
parent40797337c4135bfb68b91bc454d17e8399801620 (diff)
#730 #739: Cambios aplicados:
* Corregir errata en {{{setserveraddr}}} para tratar el fichero DHCP adecuado y establecer router por defecto si no existe. * Eliminar cambios temporales en {{{Vagrantfile}}} que corregĂ­an problemas de {{{setserveraddr}}}. * Actualizar lista de tickets resueltos. git-svn-id: https://opengnsys.es/svn/branches/version1.1@4824 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'server/bin/setserveraddr')
-rwxr-xr-xserver/bin/setserveraddr3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/bin/setserveraddr b/server/bin/setserveraddr
index c3bb3642..4f1bc148 100755
--- a/server/bin/setserveraddr
+++ b/server/bin/setserveraddr
@@ -49,8 +49,9 @@ if [ -n "$SERVERIP" ]; then
for f in /etc/{dhcp,hcp3}/dhcpd.conf; do
if [ -f $f ]; then
# Cambiar el parámetro "next-server" de DHCP.
- sed "s/next-server.*/next-server $SERVERIP;/" $f >$tmpfile
file="${f/./-$1.}"
+ sed -e "s/next-server.*/next-server $SERVERIP;/" \
+ -e "s/option routers ;/option routers ${SERVERIP%.*}.1;/" $file >$tmpfile
# Copiar el fichero y enlazarlo si hay cambios.
if [ ! $f -ef $file ] || ! diff -q $tmpfile $file &>/dev/null; then
mv $tmpfile $file