mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-05-04 08:41:41 +00:00
.github
config
distributions
licenses
packages
addons
audio
compress
databases
debug
devel
emulation
graphics
lakka
lang
linux
linux-driver-addons
linux-firmware
mediacenter
multimedia
network
oem
print
python
rust
security
sysutils
bkeymaps
busybox
dbus
dosfstools
e2fsprogs
entropy
ethmactool
eventlircd
evrepeat
exfatprogs
fuse
fuse3
ir-bpf-decoders
keyutils
kmod
libevdev
libgudev
libhid
libusb
libusb-compat
lirc
mergerfs
open-iscsi
open-vm-tools
parted
pciutils
rewritefs
sed
squashfs-tools
systemd
config
hwdb.d
patches
profile.d
scripts
cpufreq
environment-setup
network-base-setup
systemd-machine-id-setup
systemd-timesyncd-setup
usercache-setup
userconfig-setup
system.d
tmpfiles.d
udev.d
package.mk
tz
udevil
upower
usbutils
util-linux
v4l-utils
wait-time-sync
testing
textproc
tools
virtual
wayland
web
x11
packages.mk.addon_template
packages.mk.template
readme.md
projects
scripts
tools
.gitignore
CHANGELOG.md
CONTRIBUTING.md
Makefile
README.md
build_all.sh
create_tar.sh
get_libretro_tarball.sh
libretro_update.sh
pkg_all.sh
22 lines
549 B
Bash
Executable File
22 lines
549 B
Bash
Executable File
#!/bin/sh
|
|
KERNEL_NTP="${1:-/proc/net/ipconfig/ntp_servers}"
|
|
NTP_SERVERS=""
|
|
if [ -f /proc/net/ipconfig/ntp_servers ]; then
|
|
for srv in $(cat /proc/net/ipconfig/ntp_servers); do
|
|
if [ -n "$srv" -a "$srv" != "0.0.0.0" ]; then
|
|
if [ -z "$NTP_SERVERS" ]; then
|
|
NTP_SERVERS="$srv"
|
|
else
|
|
NTP_SERVERS="${NTP_SERVERS} $srv"
|
|
fi
|
|
fi
|
|
done
|
|
if [ -n "$NTP_SERVERS" ]; then
|
|
mkdir -p /run/systemd/timesyncd.conf.d/
|
|
cat <<EOF >/run/systemd/timesyncd.conf.d/kernel-ntp-servers.conf
|
|
[Time]
|
|
NTP=$NTP_SERVERS
|
|
EOF
|
|
fi
|
|
fi
|