mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #3837 from HiassofT/le92-persistent-logging
[le92] busybox: cleanup persistent log setup when debugging is enabled
This commit is contained in:
commit
2684517ad1
@ -185,7 +185,6 @@ post_install() {
|
||||
enable_service shell.service
|
||||
enable_service show-version.service
|
||||
enable_service var.mount
|
||||
enable_service var-log-debug.service
|
||||
enable_service fs-resize.service
|
||||
listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service
|
||||
|
||||
|
9
packages/sysutils/busybox/system.d/storage-log.service
Normal file
9
packages/sysutils/busybox/system.d/storage-log.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Create Persistent Log Directory on /storage
|
||||
DefaultDependencies=no
|
||||
RequiresMountsFor=/storage
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/mkdir -p /storage/.cache/log/journal
|
@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=Debug /var/log relink
|
||||
DefaultDependencies=false
|
||||
After=var.mount
|
||||
Before=systemd-journal-flush.service
|
||||
ConditionKernelCommandLine=!installer
|
||||
ConditionKernelCommandLine=|debugging
|
||||
ConditionPathExists=|/storage/.cache/debug.libreelec
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/rm -rf /var/log
|
||||
ExecStartPre=-/bin/mkdir -p /storage/log/journal
|
||||
ExecStart=-/bin/ln -sf /storage/log /var/log
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
14
packages/sysutils/busybox/system.d/var-log.mount
Normal file
14
packages/sysutils/busybox/system.d/var-log.mount
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Persistent Log Storage
|
||||
RequiresMountsFor=/var /storage
|
||||
Requires=storage-log.service
|
||||
After=storage-log.service
|
||||
ConditionKernelCommandLine=!installer
|
||||
ConditionKernelCommandLine=|debugging
|
||||
ConditionPathExists=|/storage/.cache/debug.libreelec
|
||||
|
||||
[Mount]
|
||||
What=/storage/.cache/log
|
||||
Where=/var/log
|
||||
Options=bind
|
||||
LazyUnmount=yes
|
Loading…
x
Reference in New Issue
Block a user