systemd: simplify userconfig.service

*.sample will not be force overwritten, but I dont really care
This commit is contained in:
Stefan Saraev 2014-08-03 21:50:27 +03:00 committed by Stephan Raue
parent 555b81f5ff
commit 046d192206
3 changed files with 1 additions and 47 deletions

View File

@ -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

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
# 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

View File

@ -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]