diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 1af3daa34f..39a7e6ad9b 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -103,6 +103,10 @@ post_makeinstall_target() { rm -rf $INSTALL/bin/systemd-machine-id-setup cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/bin + # copy openelec helper scripts + mkdir -p $INSTALL/lib/systemd/ + cp $PKG_DIR/scripts/openelec-userconfig $INSTALL/lib/systemd/ + # provide 'halt', 'shutdown', 'reboot' & co. mkdir -p $INSTALL/sbin ln -sf /bin/systemctl $INSTALL/sbin/halt @@ -155,4 +159,5 @@ post_install() { add_group utmp 22 enable_service machine-id.service + enable_service userconfig.service } diff --git a/packages/sysutils/busybox/init.d/04_userconfig b/packages/sysutils/systemd/scripts/openelec-userconfig old mode 100644 new mode 100755 similarity index 97% rename from packages/sysutils/busybox/init.d/04_userconfig rename to packages/sysutils/systemd/scripts/openelec-userconfig index e7a1713cbb..28545c5136 --- a/packages/sysutils/busybox/init.d/04_userconfig +++ b/packages/sysutils/systemd/scripts/openelec-userconfig @@ -1,3 +1,4 @@ +#!/bin/sh ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) @@ -17,11 +18,7 @@ # the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. # http://www.gnu.org/copyleft/gpl.html ################################################################################ - -# # copy userconfig and samples -# -# runlevels: openelec, textmode if [ -d /usr/config ]; then progress "copy userconfig and samples" diff --git a/packages/sysutils/systemd/system.d/userconfig.service b/packages/sysutils/systemd/system.d/userconfig.service new file mode 100644 index 0000000000..c023f22098 --- /dev/null +++ b/packages/sysutils/systemd/system.d/userconfig.service @@ -0,0 +1,12 @@ +[Unit] +Description=Setup User config dir +DefaultDependencies=no +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=/lib/systemd/openelec-userconfig +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target