162b7ed745
The newer ap51-flash version and updated scripts will fix a problem on big-endian machines and uses a lot less memory (libpcap is not required anymore, no more image-buffering). A loop-script per ap51-flash instance will take care of restarting the app if selected in uci-config file. git-svn-id: svn://svn.openwrt.org/openwrt/packages@20374 3c298f89-4303-0410-b956-a3cf2f4a3e73
22 lines
431 B
Bash
Executable File
22 lines
431 B
Bash
Executable File
#!/bin/sh
|
|
|
|
NAME=ap51-flash
|
|
rootfs=""
|
|
kernel=""
|
|
ubnt=""
|
|
|
|
[ $1 -eq "1" ] && loop="1"
|
|
ifname="$2"
|
|
[ -n "$3" ] && rootfs="--rootfs $3"
|
|
[ -n "$4" ] && kernel="--kernel $4"
|
|
[ -n "$5" ] && ubnt="--ubnt $5"
|
|
|
|
while [ 1 ]; do
|
|
start-stop-daemon -S -m -p /var/run/$NAME-$ifname.pid -n $NAME \
|
|
-x /usr/sbin/$NAME -- --flash-from-file $rootfs $kernel $ubnt $ifname
|
|
|
|
rm /var/run/$NAME-$ifname.pid
|
|
[ "$loop" != "1" ] && break
|
|
sleep 15
|
|
done
|