diff --git a/products-prepare/linux/yc-image-cleanup.sh b/products-prepare/linux/yc-image-cleanup.sh index 01746eb3..425cee9f 100755 --- a/products-prepare/linux/yc-image-cleanup.sh +++ b/products-prepare/linux/yc-image-cleanup.sh @@ -112,6 +112,14 @@ function preCheck { esac ;; + "Calculate") + case "$2" in + *) + echo "OK" + ;; + esac + ;; + "CentOS Linux") case "$2" in "6"|"7"|"8") @@ -125,7 +133,18 @@ function preCheck { "CentOS Stream") case "$2" in - "8") + "8"|"9") + echo "OK" + ;; + *) + echo "FAIL" + ;; + esac + ;; + + "Rocky Linux") + case "$2" in + "9.5") echo "OK" ;; *) @@ -265,7 +284,7 @@ function preCheck { "Ubuntu") case "$2" in - "14.04"|"16.04"|"18.04"|"20.04"|"22.04") + "14.04"|"16.04"|"18.04"|"20.04"|"22.04"|"24.04") echo "OK" ;; *) @@ -309,6 +328,14 @@ function definePMSType { esac ;; + "Calculate") + case "$2" in + *) + echo "OK" + ;; + esac + ;; + "CentOS Linux") case "$2" in "6"|"7") @@ -322,7 +349,15 @@ function definePMSType { "CentOS Stream") case "$2" in - "8") + "8"|"9") + echo "dnf" + ;; + esac + ;; + + "Rocky Linux") + case "$2" in + "9.5") echo "dnf" ;; esac @@ -407,7 +442,7 @@ function definePMSType { "Ubuntu") case "$2" in - "14.04"|"16.04"|"18.04"|"20.04") + "14.04"|"16.04"|"18.04"|"20.04"|"22.04"|"24.04") echo "deb" ;; esac @@ -502,6 +537,7 @@ function cleanBashHistory { unset HISTFILE rm -f /root/.bash_history rm -rf /root/.ssh/* + rm -f /root/original-ks.cfg echo "DONE" }