Compare commits

..
Author SHA1 Message Date
github-actions[bot] ebd0d4a603 Update CHANGELOG.md 2026-11-21 14:39:23 +00:00
2 changed files with 7 additions and 5 deletions

No files matched your search

+6
View File
@@ -584,6 +584,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-11-21
### 💾 Core
- Tell a dead connection from a non-JSON answer in forge API calls [@MickLesk](https://github.com/MickLesk) ([core#285](https://github.com/community-scripts/core/pull/285))
## 2026-11-20
### 🆕 New Scripts
+1 -5
View File
@@ -108,11 +108,7 @@ function trim_container() {
echo -e "${BL}[Info]${GN} Trimming ${BL}$container${CL} \n"
local before_trim after_trim
# A restored or moved container's root is not always disk-0; the volume comes
# from its config file, which needs no pct call.
local lv_name
lv_name="$(awk -F'[:,]' '/^rootfs:/ {print $3; exit}' "/etc/pve/lxc/${container}.conf" 2>/dev/null)"
[[ -n "$lv_name" ]] || lv_name="vm-${container}-disk-0"
local lv_name="vm-${container}-disk-0"
if lvs --noheadings -o lv_name 2>/dev/null | grep -qw "$lv_name"; then
before_trim=$(lvs --noheadings -o lv_name,data_percent 2>/dev/null | awk -v ctid="$lv_name" '$1 == ctid {gsub(/%/, "", $2); print $2}')
[[ -n "$before_trim" ]] && echo -e "${RD}Data before trim $before_trim%${CL}" || echo -e "${RD}Data before trim: not available${CL}"