distribution/packages/sysutils/busybox/config/profile
2022-02-05 09:23:32 -05:00

34 lines
661 B
Bash

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
debugging)
export DEBUG=yes
;;
progress)
PROGRESS=yes
;;
esac
done
if [ -e /storage/.cache/debug.libreelec ] ; then
export DEBUG=yes
fi
# functions
progress() {
if test "$PROGRESS" = yes; then
logger -s -t Boot "### $1 ###"
else
logger -t Boot "### $1 ###"
fi
}
# read config files
for config in /etc/profile.d/*; do
if [ -f "$config" ] ; then
. $config
fi
done