mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
Merge pull request #1843 from MilhouseVH/le82_userconfig_samba
userconfig: overwrite our sample files / avahi cleanup
This commit is contained in:
commit
e97c647833
@ -1 +0,0 @@
|
|||||||
nameserver 127.0.0.1
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
|
||||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
|
||||||
<service-group>
|
|
||||||
<name replace-wildcards="yes">%h</name>
|
|
||||||
<service>
|
|
||||||
<type>_smb._tcp</type>
|
|
||||||
<port>445</port>
|
|
||||||
</service>
|
|
||||||
</service-group>
|
|
@ -194,6 +194,7 @@ post_makeinstall_target() {
|
|||||||
rm -rf $INSTALL/usr/bin/systemd-machine-id-setup
|
rm -rf $INSTALL/usr/bin/systemd-machine-id-setup
|
||||||
mkdir -p $INSTALL/usr/bin
|
mkdir -p $INSTALL/usr/bin
|
||||||
cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/usr/bin
|
cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/usr/bin
|
||||||
|
cp $PKG_DIR/scripts/userconfig-setup $INSTALL/usr/bin
|
||||||
|
|
||||||
# provide 'halt', 'shutdown', 'reboot' & co.
|
# provide 'halt', 'shutdown', 'reboot' & co.
|
||||||
mkdir -p $INSTALL/usr/sbin
|
mkdir -p $INSTALL/usr/sbin
|
||||||
|
26
packages/sysutils/systemd/scripts/userconfig-setup
Executable file
26
packages/sysutils/systemd/scripts/userconfig-setup
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://www.libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC 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.
|
||||||
|
#
|
||||||
|
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Remove those sample files that we manage
|
||||||
|
for sample in $(find /storage/.config -name '*.sample' 2>/dev/null); do
|
||||||
|
[ -f /usr/config/${sample:16} ] && rm -f ${sample}
|
||||||
|
done
|
||||||
|
|
||||||
|
# Copy config files, but don't overwrite - this should replace our sample files
|
||||||
|
false | cp -iRp /usr/config/* /storage/.config/ &>/dev/null
|
@ -5,7 +5,7 @@ After=systemd-tmpfiles-setup.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/bin/sh -c "false | cp -iR /usr/config/* /storage/.config/ &>/dev/null"
|
ExecStart=/usr/bin/userconfig-setup
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user