From 33dcc9cec3a02753bad2d3c3e8cf6129dd5bf825 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 4 Aug 2025 16:30:27 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 8292a9de..039256ce 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -955,8 +955,16 @@ DOWNLIST(){ if [ "${1}" == "report" ]; then echo -e "${idsCL[LightRed]}${itemtype}${spca}${itemname}${spc}${host}${spc2}${time}${idsCL[Default]}" else - if [ "${choice^^}" == "A" ] || ([[ ${choice} == ?(-)+([0-9]) ]] && [ ${choice} -gt 0 ] 2>/dev/null && [ ${is} -eq ${choice} ]); then - [ ! -f ${NM_TMPFOLDER}/${ditem}.disable ] && touch ${NM_TMPFOLDER}/${ditem}.disable || rm -f ${NM_TMPFOLDER}/${ditem}.disable + if [[ "${NM_IGNOREHOSTS_IFDOWN}" != *"${host}"* ]]; then + if [ "${choice^^}" == "N" ]; then + rm -f ${NM_TMPFOLDER}/${ditem}.disable + if [ "${choice^^}" == "F" ]; then + touch ${NM_TMPFOLDER}/${ditem}.disable + elif [[ ${choice} == ?(-)+([0-9]) ]] && [ ${choice} -gt 0 ] 2>/dev/null && [ ${is} -eq ${choice} ]; then + [ ! -f ${NM_TMPFOLDER}/${ditem}.disable ] && touch ${NM_TMPFOLDER}/${ditem}.disable || rm -f ${NM_TMPFOLDER}/${ditem}.disable + fi + else + [ -f ${NM_TMPFOLDER}/${ditem}.disable ] && rm -f ${NM_TMPFOLDER}/${ditem}.disable fi [ ${is} -lt 10 ] && ignsel=" ${is}) " || ignsel="${is}) " @@ -979,7 +987,7 @@ DOWNLIST(){ done if [ "${1}" != "report" ]; then - echo -en "\n\033[K${idsCL[LightCyan]}Enter # to change notifications [${idsCL[Default]}Change (${idsCL[LightYellow]}A${idsCL[Default]})ll, ${idsCL[Default]}(${idsCL[LightYellow]}E${idsCL[Default]})xit${idsCL[LightCyan]}] : ${idsCL[Default]}" + echo -en "\n\033[K${idsCL[LightCyan]}Enter # to change notifications [${idsCL[Default]}Set All O(${idsCL[LightYellow]}N${idsCL[Default]}), All OF(${idsCL[LightYellow]}F${idsCL[Default]}), ${idsCL[Default]}(${idsCL[LightYellow]}E${idsCL[Default]})xit${idsCL[LightCyan]}] : ${idsCL[Default]}" read choice else choice=E