mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
busybox: add initial systemd support
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
c29403c4f3
commit
d8a7c75bfc
@ -72,6 +72,10 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`"
|
|||||||
# create /etc/hostname
|
# create /etc/hostname
|
||||||
ln -sf /proc/sys/kernel/hostname $INSTALL/etc/hostname
|
ln -sf /proc/sys/kernel/hostname $INSTALL/etc/hostname
|
||||||
|
|
||||||
|
# systemd wahts /usr/bin/mkdir
|
||||||
|
mkdir -p $INSTALL/usr/bin
|
||||||
|
ln -sf /bin/busybox $INSTALL/usr/bin/mkdir
|
||||||
|
|
||||||
# add webroot
|
# add webroot
|
||||||
mkdir -p $INSTALL/usr/www
|
mkdir -p $INSTALL/usr/www
|
||||||
echo "It works" > $INSTALL/usr/www/index.html
|
echo "It works" > $INSTALL/usr/www/index.html
|
||||||
@ -84,3 +88,7 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`"
|
|||||||
mkdir -p $INSTALL/etc/init.d
|
mkdir -p $INSTALL/etc/init.d
|
||||||
cp $PKG_DIR/scripts/09_crond $INSTALL/etc/init.d/
|
cp $PKG_DIR/scripts/09_crond $INSTALL/etc/init.d/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
enable_service debug-shell.service
|
||||||
|
enable_service var.mount
|
||||||
|
|
||||||
|
19
packages/sysutils/busybox/system.d/debug-shell.service
Normal file
19
packages/sysutils/busybox/system.d/debug-shell.service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Debug Shell
|
||||||
|
ConditionKernelCommandLine=debugging
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=HOME=/storage TERM=linux
|
||||||
|
WorkingDirectory=/storage
|
||||||
|
ExecStart=/sbin/getty -n 38400 tty3
|
||||||
|
Restart=always
|
||||||
|
RestartSec=0
|
||||||
|
TimeoutSec=0
|
||||||
|
KillMode=process
|
||||||
|
|
||||||
|
# Some login implementations ignore SIGTERM, so we send SIGHUP
|
||||||
|
# instead, to ensure that login terminates cleanly.
|
||||||
|
KillSignal=SIGHUP
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
22
packages/sysutils/busybox/system.d/var.mount
Normal file
22
packages/sysutils/busybox/system.d/var.mount
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Lesser General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Variable Directory
|
||||||
|
Documentation=man:hier(7)
|
||||||
|
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
|
||||||
|
DefaultDependencies=no
|
||||||
|
Conflicts=umount.target
|
||||||
|
Before=local-fs.target umount.target
|
||||||
|
|
||||||
|
[Mount]
|
||||||
|
What=tmpfs
|
||||||
|
Where=/var
|
||||||
|
Type=tmpfs
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=local-fs.target
|
Loading…
x
Reference in New Issue
Block a user