#!/usr/bin/env bash
#
# Author: Dmitry Razumov <asmeron@ublinux.com>
# Copyright (c) 2021-2025 UBLinux <support@ublinux.com>
#
# Initial script for UBLinux
# This script are launching before starting init from initrd script
# Current dir allways must be set to root (/)
# All system path must be relative, except initrd dirs

ENABLED=yes
[[ ${ENABLED} == "yes" ]] || exit 0

PATH=.:/:/usr/bin:/usr/local/bin:/usr/local/sbin
DEBUGMODE=no
. usr/lib/ublinux/functions
. usr/lib/ublinux/default
debug_mode "$0" "$@"

if [[ -f etc/ublinux/steam ]] ;then
  . etc/ublinux/steam
  rm -f etc/skel/.steam etc/skel/.local/share/Steam 2>/dev/null
  [[ -z "$STEAMCONF" ]] || ln -sf "$STEAMCONF" etc/skel/.steam
  [[ -z "$STEAMAPP"  ]] || ln -sf "$STEAMAPP"  etc/skel/.local/share/Steam
fi
