Compare commits
2 Commits
b894c793c1
...
57cf93ac41
| Author | SHA1 | Date | |
|---|---|---|---|
| 57cf93ac41 | |||
| e32501537d |
@@ -11,7 +11,7 @@
|
||||
# * NTPSERVERS: list of NTP servers
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_conf_ntp="0.1.6"
|
||||
export VER_conf_ntp="0.2.0"
|
||||
export DEP_conf_ntp=""
|
||||
|
||||
conf_ntp()
|
||||
@@ -21,16 +21,13 @@ conf_ntp()
|
||||
systemctl disable systemd-timesyncd || true
|
||||
fi
|
||||
|
||||
NTP_SERV=${NTP_SERV:-ntp}
|
||||
prnt I "Installing ntp daemon..."
|
||||
pkginst ntp
|
||||
pkginst $NTP_SERV
|
||||
prnt I "Stopping service ntp..."
|
||||
if [[ -n $NTP_SERV ]]; then
|
||||
svc_stop $NTP_SERV
|
||||
else
|
||||
svc_stop ntp
|
||||
fi
|
||||
|
||||
if [[ -n $NTP_SERV ]]; then
|
||||
if [[ $NTP_SERV == ntpsec ]]; then
|
||||
local conf_file="/etc/$NTP_SERV/ntp.conf"
|
||||
else
|
||||
local conf_file="/etc/ntp.conf"
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
# TODO: This is Debian only, make this universal (at least yum/dnf compatible)
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_upgrade_dist="0.2.5"
|
||||
export VER_upgrade_dist="0.3.0"
|
||||
|
||||
# As aptitude might fail if clock is too far from real time, we need to depend
|
||||
# on ntp
|
||||
export DEP_upgrade_dist="conf_ntp"
|
||||
|
||||
export SOURCE_EXT="${SOURCE_EXT:-list}"
|
||||
|
||||
upgrade_dist()
|
||||
{
|
||||
local proxyfile=/etc/apt/apt.conf.d/00proxy
|
||||
@@ -67,7 +69,12 @@ upgrade_dist()
|
||||
fi
|
||||
|
||||
# Remplace source.list from dist with ours (be smarter)
|
||||
install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" /etc/apt/sources.list
|
||||
if [[ NO_MAIN_SOURCE==true ]]; then
|
||||
install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" "/etc/apt/sources.list.d/debian.${SOURCE_EXT}"
|
||||
else
|
||||
# We don't use SYS_EXT
|
||||
install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" "/etc/apt/sources.list"
|
||||
fi
|
||||
|
||||
prnt I "Updating package list..."
|
||||
pkgupdt
|
||||
@@ -96,6 +103,9 @@ precheck_upgrade_dist()
|
||||
die 160
|
||||
fi
|
||||
file_must_exists pkgman/${SYS_DIST}_${SYS_VER}.list
|
||||
if [[ -z $NO_MAIN_SOURCE ]]; then
|
||||
prnt E "A required variable to configure apt is not defined."
|
||||
fi
|
||||
}
|
||||
|
||||
cron_upgrade_dist()
|
||||
|
||||
Reference in New Issue
Block a user