#!/bin/sh # # /config/start.sh for Kathrein UFS-910, software version 1.06 # Author: Jochen Arndt # Use on your own risk! # Feel free to modify it for your own needs. # Is box <1W version? NEWBOX="yes" # Use original start.sh (only FTP server may be optional started) #ORG="no" ORG="yes" # Start FTP server #FTP="no" FTP="yes" # Start fritzmon client #FBMON="no" FBMON="yes" # Log output (ignored if $ORG is disabled) # Use "" (no log, default), "serial" (to serial console) or file LOG="" #LOG="serial" #LOG="/tmp/standby.log" # Start OSD shell ($ORG must be disabled) OSDSHELL="no" #OSDSHELL="yes" # Example of execution of other scripts or starting applications #[ -x /config/net.sh ] && exec /config/net.sh # Start ProFTP FTP server if enabled and archive present #if [ -e /data/proftpd.tar.bz2 -a "$FTP" = "yes" ]; then # cd /ramdisk # tar xjf /data/proftpd.tar.bz2 # /ramdisk/proftpd/proftpd -c /ramdisk/proftpd/proftpd.conf #fi # Start linux-ftpd FTP server if enabled and archive present [ -e /data/ftpd -a "$FTP" = "yes" ] && /data/ftpd -D # Start fritzmon client. Delay connect by 30 seconds (15-20 is sometimes not enough) [ -e /data/fritzmon -a "$FBMON" = "yes" ] && /data/fritzmon -d30 # Execute the original start.sh in /app if [ "$ORG" = "yes" ]; then cd /app . /app/start.sh exit fi # Check for OSD shell scripts [ -x /data/osdsh.sh ] || OSDSHELL="no" [ -x /data/make_dev.sh ] || OSDSHELL="no" #[ -x /data/bin/lircd -o "$NEWBOX" != "yes" ] || OSDSHELL="no" # With new boxes, logging must be redirected [ "$OSDSHELL" = "yes" -a "$NEWBOX" = "yes" ] && LOG="/tmp/standby.log" # Set log device (defaults to no log) LOGDEV="/var/ttyIO" if [ "$LOG" = "serial" ]; then LOGDEV="/dev/ttyAS0" elif [ ! -z "$LOG" ]; then touch "$LOG" && LOGDEV="$LOG" fi # # Copied from FW 1.06 /app/start.sh # NOTE: It may be necessary to update this with newer UFS firmware versions! # /usr/sbin/telnetd -l /bin/sh #usb mount point /app/program/checkbootparam mount -t usbfs none /proc/bus/usb/ mkdir /tmp/usb mkdir /tmp/usb/0 mknod /dev/vfd c 147 0 mknod /dev/vfd_new c 148 0 insmod /root/modules26/stapi/vfd_driver_new.ko /app/program/vfd_write "Starten..." #/app/stapi_modlist_mknod.sh #make driver node cd /app/modules_sys/bin . /app/modules_sys/bin/stapi_modlist_mknod.sh mknod /dev/cimax_dev c 138 0 mknod /dev/button c 120 0 mknod /dev/stpio_dev c 134 0 #mknod /dev/vfd c 147 0 mknod /dev/wdt c 10 130 mknod /dev/sysconf c 135 0 mknod /dev/fdma_player c 150 0 # Use special lircd with OSDshell and old boxes. if [ "$OSDSHELL" = "yes" -a "$NEWBOX" != "yes" ]; then /data/bin/lircd else /usr/sbin/lircd fi #insmod /root/modules26/stapi/vfd_driver.ko insmod /root/modules26/stapi/cimax.ko insmod /root/modules26/stapi/sysconf.ko insmod /root/modules26/stapi/button.ko insmod /root/modules26/stapi/fdma_player.ko #check debug mode /app/script/checkcmdline.out cd /app/program cp /app/program/standby /ramdisk #mount -t vfat /dev/sda1 /tmp/usb/0 # Start OSDshell just before /ramdisk/standby if [ "$OSDSHELL" = "yes" ]; then (cd /data;sleep 8;/data/make_dev.sh) & (cd /data;sleep 9;/data/osdsh.sh) & fi /ramdisk/standby > "$LOGDEV" 2>&1