From 11078c6eec078f0279a58b01f13bfd26742cb7f0 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 21 Oct 2025 19:54:33 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/install.sh b/src/install.sh index 3da4430..89be17f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -191,7 +191,9 @@ generateID() { UUID=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random) UUID="${UUID^^}" UUID="${UUID//[![:print:]]/}" + echo "$UUID" > "$file" + ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" return 0 } @@ -208,7 +210,9 @@ generateAddress() { # Generate Apple MAC address based on Docker container ID in hostname MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/00:16:cb:\3:\4:\5/') MAC="${MAC^^}" + echo "$MAC" > "$file" + ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" return 0 } @@ -239,6 +243,9 @@ generateSerial() { echo "$SN" > "$file" echo "$MLB" > "$file2" + ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" + ! setOwner "$file2" && error "Failed to set the owner for \"$file2\" !" + return 0 } @@ -262,6 +269,7 @@ if [ ! -f "$BASE_IMG" ] || [ ! -s "$BASE_IMG" ]; then if [ ! -f "$BASE_IMG" ] || [ ! -s "$BASE_IMG" ]; then ! install "$VERSION" "$BASE_IMG" && exit 34 + ! setOwner "$BASE_IMG" && error "Failed to set the owner for \"$BASE_IMG\" !" fi fi