fix(scripts): set apt lock timeout to 5s for fast fallback
This commit is contained in:
1 parent
afbc402225
commit
2e66ac5b8a
2 files changed
+6
-6
No files matched your search
@@ -232,8 +232,8 @@ install_system_packages() {
|
|||||||
|
|
||||||
if has_cmd apt-get; then
|
if has_cmd apt-get; then
|
||||||
echo -e " ${CYAN}Detected Debian/Ubuntu (apt-get). Synchronizing and installing...${NC}"
|
echo -e " ${CYAN}Detected Debian/Ubuntu (apt-get). Synchronizing and installing...${NC}"
|
||||||
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=60 update -qq 2>/dev/null || true
|
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=5 update -qq 2>/dev/null || true
|
||||||
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=60 install -y "${PKGS[@]}" 2>/dev/null || true
|
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=5 install -y "${PKGS[@]}" 2>/dev/null || true
|
||||||
elif has_cmd dnf; then
|
elif has_cmd dnf; then
|
||||||
echo -e " ${CYAN}Detected Fedora/RHEL (dnf). Installing packages...${NC}"
|
echo -e " ${CYAN}Detected Fedora/RHEL (dnf). Installing packages...${NC}"
|
||||||
local DNF_PKGS=()
|
local DNF_PKGS=()
|
||||||
@@ -434,7 +434,7 @@ setup_showcase_ui() {
|
|||||||
if has_cmd apt-get; then
|
if has_cmd apt-get; then
|
||||||
echo -e " ${CYAN}📦 Configuring NodeSource Node.js 22 LTS repository...${NC}"
|
echo -e " ${CYAN}📦 Configuring NodeSource Node.js 22 LTS repository...${NC}"
|
||||||
curl -fsSL https://deb.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
curl -fsSL https://deb.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
||||||
${SUDO_PREFIX} apt-get install -y -qq nodejs || true
|
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=5 install -y -qq nodejs 2>/dev/null || true
|
||||||
elif has_cmd dnf; then
|
elif has_cmd dnf; then
|
||||||
curl -fsSL https://rpm.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
curl -fsSL https://rpm.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
||||||
${SUDO_PREFIX} dnf install -y nodejs || true
|
${SUDO_PREFIX} dnf install -y nodejs || true
|
||||||
|
|||||||
@@ -178,8 +178,8 @@ if [ ${#MISSING_CORE[@]} -gt 0 ]; then
|
|||||||
SUDO_PREFIX=""
|
SUDO_PREFIX=""
|
||||||
if [ "$(id -u)" -ne 0 ]; then SUDO_PREFIX="sudo"; fi
|
if [ "$(id -u)" -ne 0 ]; then SUDO_PREFIX="sudo"; fi
|
||||||
if command -v apt-get >/dev/null 2>&1; then
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=60 update -qq 2>/dev/null || true
|
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=5 update -qq 2>/dev/null || true
|
||||||
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=60 install -y -qq "${MISSING_CORE[@]}" 2>/dev/null || true
|
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=5 install -y -qq "${MISSING_CORE[@]}" 2>/dev/null || true
|
||||||
elif command -v dnf >/dev/null 2>&1; then
|
elif command -v dnf >/dev/null 2>&1; then
|
||||||
${SUDO_PREFIX} dnf install -y "${MISSING_CORE[@]}" || true
|
${SUDO_PREFIX} dnf install -y "${MISSING_CORE[@]}" || true
|
||||||
elif command -v pacman >/dev/null 2>&1; then
|
elif command -v pacman >/dev/null 2>&1; then
|
||||||
@@ -315,7 +315,7 @@ if [ ! -f "${SHOWCASE_INDEX}" ] && [ ! -f "${SHOWCASE_INDEX_ALT1}" ] && [ ! -f "
|
|||||||
if command -v apt-get >/dev/null 2>&1; then
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
echo -e " ${CYAN}📦 Configuring NodeSource Node.js 22 LTS repository...${NC}"
|
echo -e " ${CYAN}📦 Configuring NodeSource Node.js 22 LTS repository...${NC}"
|
||||||
curl -fsSL https://deb.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
curl -fsSL https://deb.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
||||||
${SUDO_PREFIX} apt-get install -y -qq nodejs || true
|
${SUDO_PREFIX} apt-get -o DPkg::Lock::Timeout=5 install -y -qq nodejs 2>/dev/null || true
|
||||||
elif command -v dnf >/dev/null 2>&1; then
|
elif command -v dnf >/dev/null 2>&1; then
|
||||||
curl -fsSL https://rpm.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
curl -fsSL https://rpm.nodesource.com/setup_22.x | ${SUDO_PREFIX} bash - >/dev/null 2>&1 || true
|
||||||
${SUDO_PREFIX} dnf install -y nodejs || true
|
${SUDO_PREFIX} dnf install -y nodejs || true
|
||||||
|
|||||||
Reference in new issue
Block a user