diff options
author | ramon <ramongomez@us.es> | 2016-03-15 12:52:56 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-03-15 12:52:56 +0000 |
commit | 9c05bc73b51e6c2943368cf000150a8c2640d498 (patch) | |
tree | c06ed4886bd310d999d783f50f9613da82e51d8f | |
parent | 41812518effaefa95e763881787ca310fab9397b (diff) |
Versión 1.0.6a, #734: Corregir erratas en script {{{setserveraddr}}} en rama principal.
git-svn-id: https://opengnsys.es/svn/trunk@4828 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-x | server/bin/setserveraddr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/bin/setserveraddr b/server/bin/setserveraddr index 921b4730..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 @@ -88,7 +89,7 @@ if [ -n "$SERVERIP" ]; then # - servidor o IP en URLs excepto si contienen "localhost". sed -e "s,ServidorAdm=.*,ServidorAdm=$SERVERIP," \ -e "s,IPlocal=.*,IPlocal=$SERVERIP," \ - -e '/localhost/!s,http://[^/]*/\(.*\),http://'$SERVERIP'/\1,' $f >$tmpfile + -e '/localhost/!s,https\?://[^/]*/\(.*\),https://'$SERVERIP'/\1,' $f >$tmpfile file="${f/./-$1.}" # Si se usa otro interfaz o cambian los datos de red; ... if [ ! $f -ef $file ] || ! diff -q $tmpfile $file &>/dev/null; then |