25 lines
960 B
Bash
Executable file
25 lines
960 B
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
# Minimal OS variable loading for performance
|
|
. /etc/profile.d/02-distribution
|
|
|
|
(
|
|
|
|
if [ -d "/usr/lib/autostart/quirks/platforms/${HW_DEVICE}/config" ] && \
|
|
[ ! -f ".quirk-platform-configs" ]
|
|
then
|
|
tocon "Applying ${HW_DEVICE} specific configuration..."
|
|
rsync -a --exclude={es_features.cfg,es_systems.cfg} /usr/lib/autostart/quirks/platforms/"${HW_DEVICE}"/config/* /storage/.config/ 2>/dev/null
|
|
touch /storage/.quirk-platform-configs
|
|
fi
|
|
|
|
if [ -d "/usr/lib/autostart/quirks/devices/${QUIRK_DEVICE}/config" ] && \
|
|
[ ! -f ".quirk-device-configs" ]
|
|
then
|
|
tocon "Applying ${QUIRK_DEVICE} specific configuration..."
|
|
rsync -a --exclude={es_features.cfg,es_systems.cfg} /usr/lib/autostart/quirks/devices/"${QUIRK_DEVICE}"/config/* /storage/.config/ 2>/dev/null
|
|
touch /storage/.quirk-device-configs
|
|
fi
|
|
) &
|