distribution/packages/sysutils/inject_bl301/scripts/check-bl301.sh

37 lines
653 B
Bash
Raw Normal View History

2022-02-05 14:23:32 +00:00
#!/bin/sh
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)
#
# Detect BL301 injection
#
#####################################################
#
# Comand Line Arguments
# -v = Show verbose output
#
#####################################################
VERBOSE=0
INSTALLED=0
if [ "$1" = "-v" ]; then
VERBOSE=1
fi
if [ -e /usr/sbin/inject_bl301 ]; then
inject_bl301 -i
if [ ${?} = 1 ]; then
INSTALLED=1
fi
fi
if [ "$VERBOSE" = 1 ]; then
2023-02-24 13:53:43 +00:00
if [ "${INSTALLED}" = 1 ]; then
2022-02-05 14:23:32 +00:00
echo "CoreELEC BL301 Installed"
else
echo "CoreELEC BL301 Not found"
fi
fi
2023-02-24 13:53:43 +00:00
exit ${INSTALLED}