several improvement and armonisation in filefct.sh, module auth and patch_snmp improved

This commit is contained in:
2022-01-27 13:17:56 +01:00
parent baac34cb85
commit 55a9e49101
16 changed files with 204 additions and 116 deletions

View File

@@ -15,7 +15,7 @@
# * PROXY_SRV_PORT: Working port for general purpose proxy if one declared
# ------------------------------------------------------------------------------
export VER_upgrade_dist="0.2.2"
export VER_upgrade_dist="0.2.3"
# As aptitude might fail if clock is too far from real time, we need to depend
# on ntp
@@ -26,10 +26,10 @@ upgrade_dist()
local proxyfile=/etc/apt/apt.conf.d/00proxy
local norecommends=/etc/apt/apt.conf.d/99no-recommends
# We backup entire apt dir as future version will normalise source.list files
backupdist /etc/apt
# We backup entire apt dir
backup_dist /etc/apt
prnt I "Basic apt configuration..."
tagfile $norecommend
tag_file $norecommend
echo 'APT::Install-Recommends "false";' >> $norecommends
echo 'APT::AutoRemove::RecommendsImportant "false";' >> $norecommends
echo 'APT::AutoRemove::SuggestsImportant "false";' >> $norecommends
@@ -42,17 +42,17 @@ upgrade_dist()
die 60
)
fi
tagfile $proxyfile
tag_file $proxyfile
echo "Acquire::http::Proxy \"http://${PROXY_APT}:${PROXY_APT_PORT}\";" >> $proxyfile
elif [[ -n $PROXY_SRV ]]; then
tagfile $proxyfile
tag_file $proxyfile
echo "Acquire::http::Proxy \"http://${PROXY_SRV}:${PROXY_SRV_PORT}\";" >> $proxyfile
else
prnt I "No proxy configured, nothing to do."
fi
# Remplace source.list from dist with ours (be smarter)
installfile "pkgman/${SYS_DIST}_${SYS_VER}.list" /etc/apt/sources.list
install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" /etc/apt/sources.list
prnt I "Updating package list..."
pkgupdt
@@ -80,7 +80,7 @@ precheck_upgrade_dist()
prnt E "A general proxy server have been specified but not its working port."
die 160
fi
file_exists pkgman/${SYS_DIST}_${SYS_VER}.list
file_must_exists pkgman/${SYS_DIST}_${SYS_VER}.list
}
cron_upgrade_dist()