Merge pull request 'setsmbpass-cpio-error' (#23) from setsmbpass-cpio-error into main
ogboot/pipeline/head This commit looks good Details

Reviewed-on: #23
main
Luis Gerardo Romero Garcia 2025-09-11 13:57:37 +02:00
commit 7fdc68563c
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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