From a2d4af6a40a4fc211ddcb798de84e3af2404059d Mon Sep 17 00:00:00 2001 From: mglae Date: Fri, 21 Sep 2018 23:44:00 +0200 Subject: [PATCH] samba-config.service: fix destroying .cache structure --- packages/network/samba/system.d/samba-config.service | 4 +--- packages/sysutils/systemd/scripts/usercache-setup | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/network/samba/system.d/samba-config.service b/packages/network/samba/system.d/samba-config.service index 08584b18f3..7e77388092 100644 --- a/packages/network/samba/system.d/samba-config.service +++ b/packages/network/samba/system.d/samba-config.service @@ -1,11 +1,9 @@ [Unit] Description=Samba Configuration DefaultDependencies=false +After=basic.target [Service] Type=oneshot ExecStart=/usr/lib/samba/samba-config StartLimitInterval=0 - -[Install] -WantedBy=sysinit.target diff --git a/packages/sysutils/systemd/scripts/usercache-setup b/packages/sysutils/systemd/scripts/usercache-setup index 725c400e4c..e17b7e08fe 100755 --- a/packages/sysutils/systemd/scripts/usercache-setup +++ b/packages/sysutils/systemd/scripts/usercache-setup @@ -3,6 +3,9 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) +# Fix bug in older versions creating file /storage/.cache/services +[ -f /storage/.cache/services ] && rm /storage/.cache/services && mkdir -p /storage/.cache/services + # Copy cache files, but don't overwrite false | cp -iRp /usr/cache/* /storage/.cache/ &>/dev/null