utils/ap51-flash: import from old-packages and update

Signed-off-by: Russell Senior <russell@personaltelco.net>
This commit is contained in:
Russell Senior
2016-10-17 04:34:49 -07:00
parent a3a7e0dd65
commit 5970e1395e
4 changed files with 135 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/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