Skip to content

Commit aab85ab

Browse files
committed
fix issue while creating ct without gnupg2
1 parent 5e87af5 commit aab85ab

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

misc/build.func

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,15 +1057,30 @@ EOF
10571057
msg_info "Starting LXC Container"
10581058
pct start "$CTID"
10591059
msg_ok "Started LXC Container"
1060+
msg_info "Customizing LXC Container"
10601061
if [ "$var_os" == "alpine" ]; then
10611062
sleep 3
10621063
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
10631064
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
10641065
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
10651066
EOF'
1066-
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
1067+
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses >/dev/null"
1068+
else
1069+
sleep 3
1070+
# Set locale and timezone before update
1071+
pct exec "$CTID" -- bash -c "sed -i '/$LANG/ s/^# //' /etc/locale.gen"
1072+
pct exec "$CTID" -- bash -c "locale_line=\$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print \$1}' | head -n 1) && \
1073+
echo LANG=\$locale_line >/etc/default/locale && \
1074+
locale-gen >/dev/null && \
1075+
export LANG=\$locale_line"
1076+
1077+
pct exec "$CTID" -- bash -c "echo $tz >/etc/timezone && ln -sf /usr/share/zoneinfo/$tz /etc/localtime"
1078+
1079+
# Install curl
1080+
pct exec "$CTID" -- bash -c "apt-get update >/dev/null && apt-get install -y sudo curl mc gnupg2 >/dev/null"
10671081
fi
1068-
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?
1082+
msg_ok "Customized LXC Container"
1083+
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/$var_install.sh)" $?
10691084

10701085
}
10711086

0 commit comments

Comments
 (0)