mirror of
https://github.com/dockur/macos.git
synced 2026-03-11 08:34:24 +00:00
Update install.sh
This commit is contained in:
parent
13d44e6204
commit
11078c6eec
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue