Update build.func

This commit is contained in:
CanbiZ 2025-07-25 11:05:18 +02:00
parent 5ad7379bf0
commit 04b8c22124

View File

@ -301,45 +301,32 @@ ssh_check() {
base_settings() { base_settings() {
# Default Settings # Default Settings
CT_TYPE="1" CT_TYPE=${var_unprivileged:-"1"}
DISK_SIZE="4" DISK_SIZE=${var_disk:-"4"}
CORE_COUNT="1" CORE_COUNT=${var_cpu:-"1"}
RAM_SIZE="1024" RAM_SIZE=${var_ram:-"1024"}
VERBOSE="${1:-no}" VERBOSE=${var_verbose:-"${1:-no}"}
PW="" PW=${var_pw:-""}
CT_ID=$NEXTID CT_ID=${var_ctid:-$NEXTID}
HN=$NSAPP HN=${var_hostname:-$NSAPP}
BRG="vmbr0" BRG=${var_brg:-"vmbr0"}
NET="dhcp" NET=${var_net:-"dhcp"}
IPV6_METHOD="none" IPV6_METHOD=${var_ipv6_method:-"none"}
IPV6_STATIC="" IPV6_STATIC=${var_ipv6_static:-""}
GATE="" GATE=${var_gateway:-""}
APT_CACHER="" APT_CACHER=${var_apt_cacher:-""}
APT_CACHER_IP="" APT_CACHER_IP=${var_apt_cacher_ip:-""}
#DISABLEIP6="no" MTU=${var_mtu:-""}
MTU="" SD=${var_storage:-""}
SD="" NS=${var_ns:-""}
NS="" MAC=${var_mac:-""}
MAC="" VLAN=${var_vlan:-""}
VLAN="" SSH=${var_ssh:-"no"}
SSH="no" SSH_AUTHORIZED_KEY=${var_ssh_authorized_key:-""}
SSH_AUTHORIZED_KEY="" UDHCPC_FIX=${var_udhcpc_fix:-""}
UDHCPC_FIX="" TAGS="community-script;${var_tags:-}"
TAGS="community-script;" ENABLE_FUSE=${var_fuse:-"${1:-no}"}
ENABLE_FUSE="${1:-no}" ENABLE_TUN=${var_tun:-"${1:-no}"}
ENABLE_TUN="${1:-no}"
# Override default settings with variables from ct script
CT_TYPE=${var_unprivileged:-$CT_TYPE}
DISK_SIZE=${var_disk:-$DISK_SIZE}
CORE_COUNT=${var_cpu:-$CORE_COUNT}
RAM_SIZE=${var_ram:-$RAM_SIZE}
VERB=${var_verbose:-$VERBOSE}
TAGS="${TAGS}${var_tags:-}"
ENABLE_FUSE="${var_fuse:-$ENABLE_FUSE}"
ENABLE_TUN="${var_tun:-$ENABLE_TUN}"
APT_CACHER="${var_apt_cacher:-$APT_CACHER}"
APT_CACHER_IP="${var_apt_cacher_ip:-$APT_CACHER_IP}"
# Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts
if [ -z "$var_os" ]; then if [ -z "$var_os" ]; then