mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
busybox: port debugging /var/log relink to systemd
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
01d93d4393
commit
c2f532bb8e
@ -1,42 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
# This file is part of OpenELEC - http://www.openelec.tv
|
|
||||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
|
||||||
#
|
|
||||||
# This Program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This Program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
|
||||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
|
||||||
# http://www.gnu.org/copyleft/gpl.html
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
#
|
|
||||||
# mounting needed filesystems
|
|
||||||
#
|
|
||||||
# runlevels: openelec, installer, textmode
|
|
||||||
|
|
||||||
progress "mounting needed filesystems"
|
|
||||||
mkdir -p /dev/pts
|
|
||||||
mount -n -t devpts -o gid=5,mode=620 devpts /dev/pts
|
|
||||||
|
|
||||||
mkdir -p /dev/shm
|
|
||||||
mount -n -t tmpfs -o size=20% tmpfs /dev/shm
|
|
||||||
|
|
||||||
mount -n -t tmpfs -o size=10m tmpfs /var
|
|
||||||
mount -n -t debugfs debugfs /sys/kernel/debug
|
|
||||||
|
|
||||||
if [ ! "$RUNLEVEL" = "installer" -a "$DEBUG" = "yes" ]; then
|
|
||||||
mkdir -p $HOME/log
|
|
||||||
ln -sf $HOME/log /var/log
|
|
||||||
else
|
|
||||||
mkdir -p /var/log
|
|
||||||
fi
|
|
||||||
|
|
11
packages/sysutils/busybox/system.d/var-log-debug.service
Normal file
11
packages/sysutils/busybox/system.d/var-log-debug.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Debug /var/log relink
|
||||||
|
ConditionKernelCommandLine=debugging
|
||||||
|
ConditionKernelCommandLine=!installer
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=HOME=/storage
|
||||||
|
ExecStart=/bin/sh -c 'rm -rf /var/log && mkdir -p /storage/log && ln -sf /storage/log /var/log'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=local-fs.target
|
Loading…
x
Reference in New Issue
Block a user