forked from forkanization/Proxmox-arm64
Revert upstream changes to build files
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|||||||
+52
-15
@@ -169,23 +169,60 @@ msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
|
|||||||
CONTAINER_STORAGE=$(select_storage container) || exit
|
CONTAINER_STORAGE=$(select_storage container) || exit
|
||||||
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
|
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
|
||||||
|
|
||||||
# Update LXC template list
|
|
||||||
msg_info "Updating LXC Template List"
|
|
||||||
pveam update >/dev/null
|
|
||||||
msg_ok "Updated LXC Template List"
|
|
||||||
|
|
||||||
# Get LXC template string
|
# Get LXC template string
|
||||||
TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-}
|
if [ $PCT_OSTYPE = debian ]; then
|
||||||
mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V)
|
if [ $PCT_OSVERSION = 11 ]; then
|
||||||
[ ${#TEMPLATES[@]} -gt 0 ] || exit "Unable to find a template when searching for '$TEMPLATE_SEARCH'."
|
TEMPLATE_VARIENT=bullseye
|
||||||
TEMPLATE="${TEMPLATES[-1]}"
|
else
|
||||||
|
TEMPLATE_VARIENT=bookworm
|
||||||
|
fi
|
||||||
|
elif [ $PCT_OSTYPE = alpine ]; then
|
||||||
|
TEMPLATE_VARIENT=3.19
|
||||||
|
else
|
||||||
|
if [ $PCT_OSVERSION = 20.04 ]; then
|
||||||
|
TEMPLATE_VARIENT=focal
|
||||||
|
elif [ $PCT_OSVERSION = 24.04 ]; then
|
||||||
|
TEMPLATE_VARIENT=noble
|
||||||
|
else
|
||||||
|
TEMPLATE_VARIENT=jammy
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Download LXC template if needed
|
if [ -d "/var/lib/vz/template/cache" ]; then
|
||||||
if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then
|
TEMPLATE=$PCT_OSTYPE-$TEMPLATE_VARIENT-rootfs.tar.xz
|
||||||
msg_info "Downloading LXC Template"
|
# Download template if needed
|
||||||
pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null ||
|
if [ ! -f "/var/lib/vz/template/cache/$TEMPLATE" ]; then
|
||||||
exit "A problem occured while downloading the LXC template."
|
if [ $PCT_OSTYPE = debian ]; then
|
||||||
msg_ok "Downloaded LXC Template"
|
msg_info "Downloading LXC Template"
|
||||||
|
wget -q $(curl -s https://api.github.com/repos/asylumexp/debian-ifupdown2-lxc/releases/latest | grep download | grep debian-$TEMPLATE_VARIENT-arm64-rootfs.tar.xz | cut -d\" -f4) -O /var/lib/vz/template/cache/$TEMPLATE -q || exit "A problem occured while downloading the LXC template."
|
||||||
|
msg_ok "Downloaded LXC Template"
|
||||||
|
else
|
||||||
|
templateurl="https://jenkins.linuxcontainers.org/job/image-$PCT_OSTYPE/architecture=arm64,release=$TEMPLATE_VARIENT,variant=default/lastStableBuild/artifact/rootfs.tar.xz"
|
||||||
|
msg_info "Downloading LXC Template"
|
||||||
|
wget $templateurl -O /var/lib/vz/template/cache/$TEMPLATE -q || exit "A problem occured while downloading the LXC template."
|
||||||
|
msg_ok "Downloaded LXC Template"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Update LXC template list
|
||||||
|
msg_info "Updating LXC Template List"
|
||||||
|
pveam update >/dev/null
|
||||||
|
msg_ok "Updated LXC Template List"
|
||||||
|
if [ $PCT_OSTYPE = debian ]; then
|
||||||
|
msg_error "Debian unsupported with this download method. Exiting."
|
||||||
|
elif [ $PCT_OSTYPE = alpine]; then
|
||||||
|
$TEMPLATE_VARIENT = 3.18
|
||||||
|
fi
|
||||||
|
|
||||||
|
TEMPLATE="$(pveam available | grep -E "arm64.*$PCT_OSTYPE-$TEMPLATE_VARIENT" | sed 's/arm64[[:space:]]*//')"
|
||||||
|
|
||||||
|
# Download LXC template if needed
|
||||||
|
if ! pveam list $TEMPLATE_STORAGE | grep -F $TEMPLATE > /dev/null; then
|
||||||
|
msg_info "Downloading LXC Template"
|
||||||
|
pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null ||
|
||||||
|
exit "A problem occured while downloading the LXC template."
|
||||||
|
msg_ok "Downloaded LXC Template"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Combine all options
|
# Combine all options
|
||||||
|
|||||||
+3
-4
@@ -1,8 +1,7 @@
|
|||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# Co-Author: MickLesk
|
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/asylumexp/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
# This function sets color variables for formatting output in the terminal
|
# This function sets color variables for formatting output in the terminal
|
||||||
color() {
|
color() {
|
||||||
@@ -219,7 +218,7 @@ motd_ssh() {
|
|||||||
if [ -f "$MOTD_FILE" ]; then
|
if [ -f "$MOTD_FILE" ]; then
|
||||||
# Start MOTD with application info and link
|
# Start MOTD with application info and link
|
||||||
echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE"
|
echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE"
|
||||||
echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\n" >> "$MOTD_FILE"
|
echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts & Pimox Scripts ${YW}| GitHub: ${GN}https://github.com/asylumexp/Proxmox${CL}\n" >> "$MOTD_FILE"
|
||||||
|
|
||||||
# Add system information with icons
|
# Add system information with icons
|
||||||
echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}" >> "$MOTD_FILE"
|
echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}" >> "$MOTD_FILE"
|
||||||
@@ -253,6 +252,6 @@ EOF
|
|||||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
fi
|
fi
|
||||||
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo "bash -c \"\$(wget -qLO - https://github.com/asylumexp/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user