Deprecate and remove stale post-update hooks.

This commit is contained in:
fewtarius 2024-02-07 22:07:27 +00:00
parent 51d4a4f019
commit 4b0af3f53b
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -69,75 +69,6 @@ ln -sf /usr/share/locale /storage/.config/emulationstation/locale >>/var/log/con
### Add items below this line that are safe to remove after a period of time.
################################################################################
### 20231114 - Update hosts.conf
grep "127.0.0.1" /storage/.config/hosts.conf >/dev/null 2>&1 || cp /usr/config/hosts.conf /storage/.config/
### 20231127 - Migrate games to overlayfs (updated 20231203)
NULL=$(cat /proc/mounts | grep -v -e "/storage/roms" 2>/dev/null | grep ${1})
if [ ! "$?" = 0 ]
then
umount /storage/roms
fi
GAMECOUNT=$(find /storage/roms -type f | wc -l)
if [ "${GAMECOUNT}" -gt 20 ] && \
[ ! -e "/storage/.migrated_games" ]
then
echo "Migrating games to overlayfs" >>${LOG}
tocon "Migrate games to new storage model..."
if [ -d "/storage/games-internal" ]
then
echo "Backing up games-internal" >>${LOG}
mv /storage/games-internal /storage/games-internal.backup
fi
mv /storage/roms /storage/games-internal
mkdir /storage/roms
touch /storage/.migrated_games
else
echo "Game weight too low (${GAMECOUNT}) or content already migrated." >>${LOG}
fi
### Migration part 2
if [ ! -e "/storage/.migrated_games2" ]
then
for GAMES in /storage/games-internal /storage/games-external
do
if [ ! -d "${GAMES}/roms" ]
then
mkdir -p "${GAMES}/roms" 2>/dev/null
fi
tocon "Migrate games to new storage model..."
mv "${GAMES}"/* "${GAMES}/roms/"
done
touch /storage/.migrated_games2
fi
### 20231129 - Don't default to performance.
EPP=$(get_setting system.power.epp)
if [ -z "${EPP}" ] || \
[ "${EPP}" = "performance" ]
then
EPP="balance_performance"
set_setting system.power.epp ${EPP}
fi
### 20231130 - Replace smb.conf for new overlay mechanism.
cp -f /usr/config/smb.conf /storage/.config
### 20231202 - Remove stale profile bits if they exist.
for FILE in 001-deviceconfig 99-mixer
do
rm -f /storage/.config/profile.d/${FILE} 2>/dev/null
done
### 20231203 - Disable merged storage by default.
MERGED_STORAGE=$(get_setting system.merged.storage)
if [ -z "${MERGED_STORAGE}" ]
then
set_setting system.merged.storage 0
fi
systemctl restart jelos-automount
### 20240111 - Add new jslisten hotkey
if [ -e "/storage/.config/jslisten_hotkeys" ]
then