busybox: add initial systemd support

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-04 16:50:37 +02:00
parent c29403c4f3
commit d8a7c75bfc
3 changed files with 49 additions and 0 deletions

View File

@ -72,6 +72,10 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`"
# create /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
mkdir -p $INSTALL/usr/www
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
cp $PKG_DIR/scripts/09_crond $INSTALL/etc/init.d/
fi
enable_service debug-shell.service
enable_service var.mount

View 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

View 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