install stage 1: fix setting hostname
parent
cdc16c1ad4
commit
62a532bf21
|
@ -154,7 +154,7 @@ xmirror
|
|||
TARGET_MIRROR="$(sed 's/repository=//;s|/musl$||' /etc/xbps.d/00-repository-main.conf)"
|
||||
|
||||
#TODO: select installation type
|
||||
TARGET_TYPE="x86_64-musl"
|
||||
TARGET_TYPE="x86_64"
|
||||
|
||||
if grep "musl" <<< "$TARGET_TYPE"; then
|
||||
TARGET_MIRROR="$TARGET_MIRROR/musl"
|
||||
|
@ -252,7 +252,7 @@ while [ -z "$TARGET_HOSTNAME" ]; do
|
|||
TARGET_HOSTNAME="void-usb"
|
||||
else
|
||||
if grep -e "^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$" -e "^[a-zA-Z0-9]*$" <<< "$TARGET_HOSTNAME" > /dev/null 2>&1; then
|
||||
echo "$TARGET_HOSTNAME" > /mnt/target/etc/hostname
|
||||
true
|
||||
else
|
||||
echo "Allowed characters are a-zA-Z0-9 (and - in the middle)."
|
||||
unset TARGET_HOSTNAME
|
||||
|
@ -260,7 +260,7 @@ while [ -z "$TARGET_HOSTNAME" ]; do
|
|||
fi
|
||||
done
|
||||
|
||||
|
||||
echo "$TARGET_HOSTNAME" > /mnt/target/etc/hostname
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue