9ce6bbd92a
* new init system * update new init scripts * update checksum * fix broken audio promps with new init scripts * fix debug/upgrade mode * fix bonding and eth0 hw addr * add checksum * fix bonding setup * add rtsp auth disable * adjust network init scripts path * recreated repo and re added cron scripts (#211) * recreated repo and re added cron scripts * rename cron script and move it to the right folder. * Delete .vs directory remove .vs directory * add deubg message to bonding rc.d script * add crontab variable to wz_mini.conf * fix mp4write * add syslog debug feature * fix syslog init blocking * fix syslog save function * increase imp_helper rerun delay * update init scripts * fix bonding and usb-direct * update checksum * add netmon for bonding * fix supervisor function * update model detection * fix debugging injection on T20 devices Co-authored-by: sideup66 <47700565+sideup66@users.noreply.github.com>
41 rader
1.1 KiB
Bash
41 rader
1.1 KiB
Bash
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides:
|
|
# Short-Description: Check for first boot of wz_mini
|
|
# Description: Check to see if this is the first time wz_mini is booting, if it is, play an audio prompt
|
|
### END INIT INFO
|
|
|
|
. /opt/wz_mini/wz_mini.conf
|
|
. /opt/wz_mini/etc/rc.common
|
|
|
|
|
|
case "$1" in
|
|
start)
|
|
|
|
echo "#####$(basename "$0")#####"
|
|
|
|
if [ -e /opt/wz_mini/etc/.first_boot ]; then
|
|
echo "First boot already completed"
|
|
else
|
|
echo "First boot, initializing"
|
|
touch /opt/wz_mini/etc/.first_boot
|
|
|
|
#May need different gpio for PANv1
|
|
#We don't rmmod this module, as it is marked [permanent] by the kernel on T20
|
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/audio.ko sign_mode=0
|
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/init_v2.wav $AUDIO_PROMPT_VOLUME
|
|
else
|
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
|
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/init.wav $AUDIO_PROMPT_VOLUME
|
|
rmmod audio
|
|
fi
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|