mirror of https://github.com/OpenIPC/firmware.git
Add script
parent
5ddaaeb935
commit
fd261b89af
|
@ -22,6 +22,30 @@ start() {
|
||||||
export TZ=$(cat /etc/TZ)
|
export TZ=$(cat /etc/TZ)
|
||||||
load_xiongmai -i
|
load_xiongmai -i
|
||||||
#
|
#
|
||||||
|
SNS_TYPE=$(ipcinfo --short_sensor)
|
||||||
|
if [ -f /usr/lib/libsns.so ]; then
|
||||||
|
logger -s -p daemon.info -t xiongmai "You sensor is $SNS_TYPE and symlink to libsns.so found"
|
||||||
|
else
|
||||||
|
logger -s -p daemon.info -t xiongmai "You sensor is $SNS_TYPE and symlink to libsns.so not found"
|
||||||
|
case $SNS_TYPE in
|
||||||
|
|
||||||
|
sc2315e)
|
||||||
|
logger -s -p daemon.info -t xiongmai "Detected $SNS_TYPE and create new symlink to libsns_X123_XM530.so";
|
||||||
|
ln -sf /usr/lib/sensors/libsns_X123_XM530.so /usr/lib/libsns.so;
|
||||||
|
;;
|
||||||
|
|
||||||
|
sc335e)
|
||||||
|
logger -s -p daemon.info -t xiongmai "Detected $SNS_TYPE and create new symlink to libsns_X123_XM530.so";
|
||||||
|
ln -sf /usr/lib/sensors/libsns_X123_XM530.so /usr/lib/libsns.so;
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
logger -s -p daemon.info -t xiongmai "The $SNS_TYPE sensor not supported now";
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
#
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
|
Loading…
Reference in New Issue