1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/EN7526G_3.18Kernel_SDK/filesystem/boaroot/cgi-bin/showusb.cgi
2024-07-22 01:58:46 -03:00

29 lines
342 B
Bash
Executable File

#!/bin/sh
echo "Content-Type: text/html"
echo ""
mypath="/tmp/mnt"
count=0
showusb()
{
for i in `ls`
do
if [ -d $i -a "$i" != "dev" ]
then
echo "usbvalue["$count"]=\""$i"\";"
count=`expr $count + 1`
fi
done
}
echo "var usbvalue = new Array();"
if [ -d "$mypath" ]
then
cd $mypath
showusb ""
fi