Merge pull request #3837 from HiassofT/le92-persistent-logging

[le92] busybox: cleanup persistent log setup when debugging is enabled
This commit is contained in:
MilhouseVH 2019-09-24 20:51:55 +01:00 committed by GitHub
commit 2684517ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 19 deletions

View File

@ -185,7 +185,6 @@ post_install() {
enable_service shell.service enable_service shell.service
enable_service show-version.service enable_service show-version.service
enable_service var.mount enable_service var.mount
enable_service var-log-debug.service
enable_service fs-resize.service enable_service fs-resize.service
listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service

View 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

View File

@ -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

View 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