Configure before start, fix replacement

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-08-11 14:34:25 +02:00
parent 25fa2dcf76
commit 4d7beeb7fd
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@ pkgname=(
luzifer-devel
luzifer-gui
)
pkgver=0.1.1
pkgver=0.1.2
pkgrel=1
pkgdesc='System configuration for @luzifer systems'
arch=(any)

View file

@ -3,11 +3,8 @@ post_install() {
}
post_upgrade() {
# Enable timesync
systemctl enable --now systemd-timesyncd
# Set NTP servers
ntp_servers=(
local ntp_servers=(
ptbtime1.ptb.de
ptbtime2.ptb.de
ptbtime3.ptb.de
@ -16,7 +13,10 @@ post_upgrade() {
ntps1-0.cs.tu-berlin.de
ntps1-1.cs.tu-berlin.de
)
sed -E "s/^#?NTP=.*$/NTP=${ntp_servers[@]}/" /etc/systemd/timesyncd.conf
sed -i -E "s/^#?NTP=.*$/NTP=$(echo ${ntp_servers[@]})/" /etc/systemd/timesyncd.conf
# Enable timesync
systemctl enable --now systemd-timesyncd
# Set local time
ln -sf /usr/share/zoneinfo/Europe/Berlin "/etc/localtime"