diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b26d0e..96ac42a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.11] - 2024-09-11 +### Changed +- Resuelve bug para que ejecute como sudo el comando cpio en el setsmbpass + ## [0.8.10] - 2024-07-05 ### Changed - Añade oglive BIOS para el arranque de Windows al arrancarlo desde el ogbrowser diff --git a/bin/setsmbpass b/bin/setsmbpass index 26b0d93..8ca929a 100755 --- a/bin/setsmbpass +++ b/bin/setsmbpass @@ -68,19 +68,19 @@ for OGLIVE in $LIST; do echo "Verificar si el archivo es gzip, lz4 o ASCII cpio antes de descomprimir" if file "$CLIENTINITRD" | grep -q "gzip compressed data"; then - if ! gzip -dc "$CLIENTINITRD" | cpio -im; then + if ! gzip -dc "$CLIENTINITRD" | sudo cpio -im; then echo "Error: No se pudo descomprimir y extraer $CLIENTINITRD con gzip." exit 4 fi COMPRESS_CMD="gzip -9c" elif file "$CLIENTINITRD" | grep -q "LZ4 compressed data"; then - if ! lz4 -d "$CLIENTINITRD" | cpio -im; then + if ! lz4 -d "$CLIENTINITRD" | sudo cpio -im; then echo "Error: No se pudo descomprimir y extraer $CLIENTINITRD con lz4." exit 4 fi COMPRESS_CMD="lz4 -c" elif file "$CLIENTINITRD" | grep -q "ASCII cpio archive"; then - if ! cpio -im < "$CLIENTINITRD"; then + if ! sudo cpio -im < "$CLIENTINITRD"; then echo "Error: No se pudo extraer $CLIENTINITRD como archivo cpio." exit 4 fi @@ -94,7 +94,7 @@ for OGLIVE in $LIST; do sudo sed -i "s/OPTIONS=\(.*\)user=\w*\(.*\)pass=\w*\(.*\)/OPTIONS=\1user=$SAMBAUSER\2pass=$SAMBAPASS\3/" scripts/ogfunctions # TEMPORAL: solución ticket 554, actualizar cliente en caché (ogLive r3257). sudo sed -i "s/busybox reboot/reboot/" scripts/ogfunctions - find . | cpio -H newc -oa | gzip -9c > "$CLIENTINITRD" + find . | sudo cpio -H newc -oa | gzip -9c > "$CLIENTINITRD" else echo "$PROG: Aviso: no se ha modificado la clave del cliente \"$OGLIVE\"." fi