Using the soft timeout option for NFS mounts is a really bad idea
and the nfs(5) manpage explicitly warns about it's issues:
NB: A so-called "soft" timeout can cause silent data
corruption in certain cases. As such, use the soft op‐
tion only when client responsiveness is more important
than data integrity. Using NFS over TCP or increasing
the value of the retrans option may mitigate some of the
risks of using the soft option.
So don't enable it by default, anyone who feels keen to take the
risk can specify it manually on kernel command line.
Signed-off-by: Matthias Reichl <hias@horus.com>
/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>
- enables eventlircd for Imon UltraBay (front panel buttons)
- this will fix the issue with some front panel buttons not being
detected by Kodi (if keycode value is higher than 255)
Signed-off-by: pretoriano80 <viusflag@libero.it>
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.
journald on systemd versions up to 242 don't close the persistent
journal files on shutdown which leads to a harmless but annoying
Failed unmounting message during shutdown
https://github.com/systemd/systemd/issues/867
Set LazyUnmount=yes on the persistent log mount unit as a temporary
workaround until systemd is updated to 243 or newer.
Signed-off-by: Matthias Reichl <hias@horus.com>
The ancient approach of symlinking /var/log to /storage/log doesn't
play nice with systemd as it doesn't setup proper dependencies and
unmounting /storage during shutdown may fail because systemd doesn't
know that it's needed for /var/log.
Use a conditional bind mount instead so systemd can automatically
create proper dependencies and unmount filesystems in the correct order.
Also store the persistent logfiles on /storage in a .cache/log
directory instead of log to avoid confusing users - users can access
logfiles via /var/log.
Note: we can't use tmpfiles.d to create the .cache/log directory on
/storage because that would run after local-fs.target but we need
the .log directory before that so it has to be done via a one-shot
service.
Signed-off-by: Matthias Reichl <hias@horus.com>
to have a full set of binaries in the init process as early as possible
it now mounts the squashfs direct after mounting /flash.
there is also a hook /flash/post-sysroot.sh for custom scripting.
i will use this e.g. for lvm2 and cryptsetup in the init process,
because they are very big and i dont like them in initramfs.
Copying SYSTEM to RAM eats up precious memory that'd be better used
for kernel filesystem cache and other things and can takes quite some
time on slower storage devices like SD cards.
Instead of having two options to define a minimum RAM size (below
which SYSTEM won't be copied) and the "noram" option (which disables
copying completely) reverse the logic and use a single "toram" option
which users can set on kernel command line if they want SYSTEM copied
to RAM.
Signed-off-by: Matthias Reichl <hias@horus.com>
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>