mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-04-02 10:41:46 -04:00
* Switch: it builds * Switch: Use udev to finalize usb gadget to save from systemd looping service restart until cable connected. * Switch: Update kernel stuff again * Switch: Downgrade Alsa packages to version in 4.x tree * Joycond: Update Switch version * Switch: Minor fixes * LibreELEC: Fix a few broken files from upstream pull * Switch: Fix LibreELEC build. * Switch: Update bootloader stuff * L4T: FFMPEG: Add support for nvv4l2 decoder/encoder * FFMPEG: Add back encoder support for game recording in retroarch * FFMPEG: revert a few changes, and add support for vulkan.
27 lines
1,017 B
Bash
Executable file
27 lines
1,017 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# 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
|
|
|
|
# Merge default and custom shadow file details
|
|
if [ -f /storage/.cache/shadow -a -f /usr/cache/shadow ]; then
|
|
# Get existing root details (possibly user defined)
|
|
userroot="$(grep "^root:" /storage/.cache/shadow)"
|
|
|
|
# Overwrite users shadow file with default details, replacing root with any existing value
|
|
# If current file is garbage (ie. missing root) then replace it
|
|
if [ -n "${userroot}" ]; then
|
|
sed -e "s ^root:.* ${userroot} " /usr/cache/shadow >/storage/.cache/shadow
|
|
else
|
|
cp -fp /usr/cache/shadow /storage/.cache/shadow
|
|
fi
|
|
|
|
# Make sure we have the correct permission
|
|
chmod 000 /storage/.cache/shadow
|
|
fi
|