-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from lone-boy/master
add antsdr-e310v2 support
- Loading branch information
Showing
260 changed files
with
1,825,627 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
# | ||
# Start mdev.... | ||
# | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting mdev: " | ||
echo /sbin/mdev >/proc/sys/kernel/hotplug | ||
/sbin/mdev -s | ||
|
||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
stop) | ||
;; | ||
restart|reload) | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# | ||
# Start watchdog | ||
# | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting watchdog: " | ||
watchdog -t 5 -T 10 /dev/watchdog | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
stop) | ||
;; | ||
restart|reload) | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /bin/sh | ||
# | ||
# urandom This script saves the random seed between reboots. | ||
# It is called from the boot, halt and reboot scripts. | ||
# | ||
# Version: @(#)urandom 1.33 22-Jun-1998 [email protected] | ||
# | ||
|
||
[ -c /dev/urandom ] || exit 0 | ||
#. /etc/default/rcS | ||
|
||
case "$1" in | ||
start|"") | ||
echo -n "Starting initializing random number generator: " | ||
|
||
dmesg | sha512sum > /dev/urandom | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
stop) | ||
|
||
;; | ||
*) | ||
echo "Usage: urandom {start|stop}" >&2 | ||
exit 1 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /bin/sh | ||
|
||
|
||
case "$1" in | ||
start|"") | ||
echo -n "Starting miscellaneous setup: " | ||
# Restore saved password and Dropbear keys | ||
[[ -d /mnt/jffs2/etc ]] && cd /mnt/jffs2/etc && md5sum -s -c password.md5 && cp passwd shadow group /etc | ||
[[ -d /mnt/jffs2/etc/dropbear ]] && cd /mnt/jffs2/etc/dropbear && md5sum -s -c keys.md5 && cp dropbear* /etc/dropbear/ | ||
[[ -d /mnt/jffs2/root/.ssh ]] && cd /mnt/jffs2/root/.ssh && md5sum -s -c keys.md5 && mkdir /root/.ssh && cp authorized_keys /root/.ssh | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
stop) | ||
|
||
;; | ||
*) | ||
echo "Usage: $0 {start|stop}" >&2 | ||
exit 1 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/sh | ||
# | ||
# Start the network.... | ||
# | ||
|
||
# Debian ifupdown needs the /run/network lock directory | ||
|
||
source /etc/device_config | ||
|
||
create_system_files () { | ||
|
||
IFAC=/etc/network/interfaces | ||
|
||
HOSTNAME=`fw_printenv -n hostname 2> /dev/null || cat /etc/hostname` | ||
echo $HOSTNAME > /etc/hostname | ||
|
||
ETH_IPADDR=`fw_printenv -n ipaddr_eth 2> /dev/null || echo 192.168.1.10` | ||
ETH_NETMASK=`fw_printenv -n netmask_eth 2> /dev/null || echo 255.255.255.0` | ||
|
||
echo -e "auto eth0" >> $IFAC | ||
if [ -n "$ETH_IPADDR" ] | ||
then | ||
echo -e "iface eth0 inet static" >> $IFAC | ||
echo -e "\taddress $ETH_IPADDR\n""\tnetmask $ETH_NETMASK\n" >> $IFAC | ||
else | ||
echo -e "iface eth0 inet dhcp\n" >> $IFAC | ||
fi | ||
} | ||
|
||
mkdir -p /run/network | ||
|
||
case "$1" in | ||
start) | ||
create_system_files | ||
printf "Starting network: " | ||
/bin/hostname -F /etc/hostname | ||
/sbin/ifup -a 2>&1 | logger | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
stop) | ||
printf "Stopping network: " | ||
/sbin/ifdown -a | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
restart|reload) | ||
"$0" stop | ||
"$0" start | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
exit $? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# Server-side demuxing by default | ||
|
||
source /etc/device_config | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting dhcpd Daemon & httpd Server: " | ||
start-stop-daemon -S -q -p /var/run/udhcpd.pid -x /usr/sbin/udhcpd -- $UDHCPD_CONF | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
|
||
stop) | ||
echo -n "Stopping dhcpd Daemon & httpd Server: " | ||
start-stop-daemon -K -q -p /var/run/udhcpd.pid 2>/dev/null | ||
[ $? = 0 ] && echo "OK" || echo "FAIL" | ||
;; | ||
|
||
restart) | ||
$0 stop | ||
sleep 1 | ||
$0 start | ||
;; | ||
|
||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/bin/sh | ||
|
||
destdir=/media | ||
|
||
my_umount() | ||
{ | ||
if grep -qs "^/dev/$1 " /proc/mounts ; then | ||
umount "${destdir}/$1"; | ||
echo heartbeat > /sys/class/leds/led0:green/trigger | ||
fi | ||
|
||
[ -d "${destdir}/$1" ] && rmdir "${destdir}/$1" | ||
} | ||
|
||
do_mount() | ||
{ | ||
local errno | ||
local err | ||
|
||
errno=0 | ||
for I in $(seq 5) | ||
do | ||
err=$(mount -t auto -o sync "/dev/$1" "${destdir}/$1" 2>&1) | ||
errno=$? | ||
|
||
# If we get a "Device or resource busy" error, retry again in a | ||
# little bit, otherwise just return immediately. | ||
if ! echo "${err}" | grep -q "Device or resource busy" | ||
then | ||
return ${errno} | ||
fi | ||
|
||
sleep .25 | ||
done | ||
|
||
echo "${err}" >&2 | ||
return ${errno} | ||
} | ||
|
||
my_mount() | ||
{ | ||
mkdir -p "${destdir}/$1" || exit 1 | ||
|
||
if ! do_mount $1; then | ||
# failed to mount, clean up mountpoint | ||
rmdir "${destdir}/$1" | ||
exit 1 | ||
fi | ||
|
||
echo default-on > /sys/class/leds/led0:green/trigger | ||
|
||
for i in ${destdir}/$1/runme??* ;do | ||
|
||
# Ignore dangling symlinks (if any). | ||
[ ! -f "$i" ] && continue | ||
|
||
case "$i" in | ||
*.sh) | ||
# Source shell script for speed. | ||
( | ||
trap - INT QUIT TSTP | ||
set start | ||
. $i | ||
) | ||
;; | ||
*) | ||
# No sh extension, so fork subprocess. | ||
$i start | ||
;; | ||
esac | ||
done | ||
} | ||
|
||
case "${ACTION}" in | ||
add|"") | ||
my_umount ${MDEV} | ||
my_mount ${MDEV} | ||
;; | ||
remove) | ||
my_umount ${MDEV} | ||
;; | ||
remove_all) | ||
for i in ${destdir}/??* | ||
do | ||
my_umount $(basename $i) | ||
done | ||
esac |
Oops, something went wrong.