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>
46 lines
1.2 KiB
Bash
46 lines
1.2 KiB
Bash
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides:
|
|
# Short-Description: Extract Swap archive
|
|
# Description: Enable required swap file for system. System will crash without it.
|
|
### 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/swap.gz ]; then
|
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/swap_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/swap.wav $AUDIO_PROMPT_VOLUME
|
|
rmmod audio
|
|
fi
|
|
echo "Swap archive present, extracting"
|
|
gzip -d /opt/wz_mini/swap.gz
|
|
mkswap /opt/wz_mini/swap
|
|
sync;echo 3 > /proc/sys/vm/drop_caches
|
|
else
|
|
echo "Swap archive missing, not extracting"
|
|
fi
|
|
|
|
if [[ "$ENABLE_SWAP" == "true" ]] && [[ -e /opt/wz_mini/swap ]]; then
|
|
echo "Swap file found, enable"
|
|
/opt/wz_mini/bin/busybox swapon /opt/wz_mini/swap
|
|
else
|
|
echo "Swap file missing"
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|