diff options
Diffstat (limited to 'installer')
-rwxr-xr-x | installer/opengnsys_import.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/installer/opengnsys_import.sh b/installer/opengnsys_import.sh index 9b5a2b00..7dcaad3f 100755 --- a/installer/opengnsys_import.sh +++ b/installer/opengnsys_import.sh @@ -296,7 +296,7 @@ if [ "$CHECK" ]; then fi # Parámetros especiales de restauración. -[ "$NOLOGS" ] && TARPARMS="--exclude=$PREFIX/log/" +[ "$NOLOGS" ] && TARPARAMS="--exclude=$PREFIX/log" # Descomprimimos backup tar -xvzf $BACKUPFILE --directory /tmp $TARPARAMS &>/dev/null @@ -354,11 +354,13 @@ fi # definimos valores adecuados por defecto. # Excluding repository table import, if needed. [ "$NOREPOS" ] && sed -i -e '/Table structure.* `repositorios`/,/Table structure/d' $MYSQLFILE -[ "$NOUSERS" ] && sed -i -e '/Table structure.*`usuarios`/,/CHARSET/d' \ - -e '/usuarios/s/IGNORE//g' \ - -e '/usuarios/s/^INSERT /\nALTER TABLE usuarios ADD UNIQUE (usuario);\n\nINSERT IGNORE /g' \ +[ "$NOUSERS" ] && sed -i -e '/INSERT INTO `usuarios`/s/^/\/*/' \ + -e '/INSERT INTO `usuarios`/s/$/*\//' \ $MYSQLFILE sed -i -e '/Table structure.* `entornos`/,/Table structure/d' \ + -e '/Table structure.*`usuarios`/,/CHARSET/d' \ + -e '/usuarios/s/IGNORE//g' \ + -e '/usuarios/s/^INSERT /\nALTER TABLE usuarios ADD UNIQUE (usuario);\n\nINSERT IGNORE /g' \ -e "s/\(DEFINER=\`\)[^\`]*\(\`.* TRIGGER\)/\1$USUARIO\2/" \ -e "s/\(\` [a-z]*int([0-9]*) NOT NULL\),/\1 DEFAULT 0,/" \ -e "s/\(\` [a-z]*char([0-9]*) NOT NULL\),/\1 DEFAULT '',/" \ |