From 321c86a7c3be2b70900a70e6c97e75ad7e3fa059 Mon Sep 17 00:00:00 2001 From: lgromero Date: Thu, 11 Sep 2025 13:55:19 +0200 Subject: [PATCH 1/2] refs #2772 adds sudo to cpio in setsmbpass --- bin/setsmbpass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.40.1 From f3495af658144260ab4def218328671f230e986f Mon Sep 17 00:00:00 2001 From: lgromero Date: Thu, 11 Sep 2025 13:55:46 +0200 Subject: [PATCH 2/2] refs #2772 updates changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.40.1