fix typo, minor optimisation, identation fix
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
# * PROXY_SRV_PORT: Working port for general purpose proxy if one declared
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_upgrade_dist="0.2.4"
|
||||
export VER_upgrade_dist="0.2.5"
|
||||
|
||||
# As aptitude might fail if clock is too far from real time, we need to depend
|
||||
# on ntp
|
||||
@@ -39,16 +39,16 @@ upgrade_dist()
|
||||
prnt I "Configuring proxy for APT..."
|
||||
if [[ -n $PROXY_APT ]]; then
|
||||
if [[ ! -d $(dirname $proxyfile) ]]; then
|
||||
mkdir -pv $(dirname $proxyfile) || (
|
||||
mkdir -pv "$(dirname $proxyfile)" || (
|
||||
prnt E "Impossible to create directory to receive APT configuration."
|
||||
die 60
|
||||
)
|
||||
else
|
||||
# Cleanup
|
||||
if [[ -s $proxyfile ]]; then
|
||||
emptyflie $proxyfile
|
||||
emptyfile $proxyfile
|
||||
fi
|
||||
if [[ $(grep "^Acquire::http::Proxy" /etc/apt/apt.conf) ]]; then
|
||||
if grep -q "^Acquire::http::Proxy" /etc/apt/apt.conf; then
|
||||
sed -i -e "/^Acquire::http::Proxy/d" /etc/apt/apt.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user