/storage will be unmounted by systemd-shutdown, like /flash.
As the squashfs root has several symlinks to /storage it
should not be unmounted during the normal shutdown process.
This prevents the symlinked files/directories vanishing too early
and also removes the "unmount /storage failed" messages when
netbooting.
Signed-off-by: Matthias Reichl <hias@horus.com>
This removes the root mount dependency on systemd-journal.socket
and fixes drop-in loading for storage.mount.
See https://github.com/systemd/systemd/pull/14040
Signed-off-by: Matthias Reichl <hias@horus.com>
connman's NTP client can't be used if it's not managing the network
interface so use systemd's timesyncd as we already build it.
timesyncd is automatically configured to use the NTP servers provided
by kernel ip config, if they are missing the default fallback NTP
servers (currently the ones from Google) are used.
Users can also provide timesyncd configuration files via
/storage/.config/timesyncd.conf.d/ eg to change the (fallback) servers.
Signed-off-by: Matthias Reichl <hias@horus.com>
Setup system hostname, /etc/resolv.conf and /etc/hosts in a service
that can be run independently of connman.
The volatile etc files are created in /run/libreelec instead of
/run/connman so they can be modified similarily to standard linux
installations with a writable /etc. Connman can then hook into
that and move resolv.conf management to /run/connman/resolv.conf when
it's started.
If kernel IP configuration is used the resolv info from the kernel
will be used to create resolv.conf. Users can also provide their
own resolv.conf file in /storage/.config/resolv.conf which takes
precedence over ther kernel info. If no resolv.conf info is present
a fallback with use the Google nameservers is created (as before).
Loopback network interface setup has been removed, this is already
set up by systemd.
Signed-off-by: Matthias Reichl <hias@horus.com>
With systemd-debug-generator installed we can use the standard
"systemd.debug_shell" kernel command line parameter to enable the debug
shell. Since systemd 243 the tty can also be changed by appending
"=ttyXYZ" to that parameter.
Use this method instead of enabling the debug shell on all systems
by default.
Signed-off-by: Matthias Reichl <hias@horus.com>
/etc/98-busybox.conf configures the prompt and TERM.
PR #3326 stopped sourcing /etc/profile, which meant the
prompt no longer includes the HOSTNAME.
Additionally, #3326 removed code which unhides the cursor.
This allows us to use the default debug-shell.service provided
by systemd and cut down on custom made services. This will also
always provide a debug shell as there is no reason we shouldn't
have access to one.
add drop-in to set DefaultDependencies=no on /flash mount. This
removes the Conflicts=umount.target and /flash won't be unmounted
by systemd. systemd-shutdown will then later remount it ro and
try to unmount it.
Signed-off-by: Matthias Reichl <hias@horus.com>
Without this option systemd 241 and newer builds will run git describe
and report the LibreELEC git tree info as version, eg in journal
systemd 8.95.002-927-gb1cdc76 running in system mode.
With version-tag set the version is reported like before
systemd 242 running in system mode.
Signed-off-by: Matthias Reichl <hias@horus.com>
Creating an updates symlink to /storage/.config/firmware in the
kernel firmware directory makes it impossible to add firmware
overlays with an updates folder.
Furthermore bluez/hciattach only looks for firmware files directly in
the /lib/firmware directory and ignores the /lib/firmware/updates
directory. So adding BT firmware via .config/firmware didn't work.
Solve this by adding files from /storage/.config/firmware as the
last step in kernel overlays setup so firmware files from there
will show up directly under /lib/firmware and override other firmware
files installed by the system and kernel overlays.
Signed-off-by: Matthias Reichl <hias@horus.com>