From 6de82b7b0ae5660ac1f295e279956f932437a00a Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sun, 3 Aug 2014 21:50:27 +0300 Subject: [PATCH] systemd: simplify userconfig.service *.sample will not be force overwritten, but I dont really care --- packages/sysutils/systemd/package.mk | 4 -- .../systemd/scripts/openelec-userconfig | 42 ------------------- .../systemd/system.d/userconfig.service | 2 +- 3 files changed, 1 insertion(+), 47 deletions(-) delete mode 100755 packages/sysutils/systemd/scripts/openelec-userconfig diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 8eb35dac1d..b24735f38f 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -142,10 +142,6 @@ post_makeinstall_target() { rm -rf $INSTALL/usr/bin/systemd-machine-id-setup cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/usr/bin - # copy openelec helper scripts - mkdir -p $INSTALL/usr/lib/openelec - cp $PKG_DIR/scripts/openelec-userconfig $INSTALL/usr/lib/openelec/ - # provide 'halt', 'shutdown', 'reboot' & co. mkdir -p $INSTALL/usr/sbin ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/halt diff --git a/packages/sysutils/systemd/scripts/openelec-userconfig b/packages/sysutils/systemd/scripts/openelec-userconfig deleted file mode 100755 index a8ab273b1e..0000000000 --- a/packages/sysutils/systemd/scripts/openelec-userconfig +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC 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 of the License, or -# (at your option) any later version. -# -# OpenELEC 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. If not, see . -################################################################################ -# copy userconfig and samples - -. /etc/profile - -if [ -d /usr/config ]; then - progress "copy userconfig and samples" - - cd /usr/config - mkdir -p /storage/.config - - for dir in `find . -type d`; do - mkdir -p /storage/.config/$dir - done - - for config in `find . -type f -not -name "*.sample"`; do - if [ ! -f /storage/.config/$config ]; then - cp $config /storage/.config/$config - fi - done - - for sample in `find . -type f -name "*.sample"`; do - cp $sample /storage/.config/$sample - done -fi diff --git a/packages/sysutils/systemd/system.d/userconfig.service b/packages/sysutils/systemd/system.d/userconfig.service index a79877e923..e4ab2537bc 100644 --- a/packages/sysutils/systemd/system.d/userconfig.service +++ b/packages/sysutils/systemd/system.d/userconfig.service @@ -6,7 +6,7 @@ Conflicts=shutdown.target [Service] Type=oneshot -ExecStart=/usr/lib/openelec/openelec-userconfig +ExecStart=/bin/sh -c "false | cp -iR /usr/config/* /storage/.config/ &>/dev/null" RemainAfterExit=yes [Install]