OK, it does look like most of the testing is done in that last file I listed.
The lines:
ping -qnc 1 -W 1 "$Device_IP" &> /dev/null
HostIsUp=$?
if [[ "$HostIsUp" != "0" ]] ;then
SetKidsOnline "$Device_ID" "0"
Log "Device $Device_ID ($Device_IP) doesn't respond to our ping."
continue
fi
Imply that the NAS needs to be pingable, to be considered online... so check that (some security might block ICMPs)
The lines:
smbclient -U $Device_Username%$Device_Password --list=//
$Device_IP --grepable 2>/dev/null | grep "^Disk" | cut -d'|' -f2 | grep -q "^${S
hare_Name}$"
Imply that the share needs to be either advertised or at least mountable. You should try these in a terminal and see what it returns. If your NAS IP is 192.168.80.200, and your username and password are both "media", then...
smbclient -U media%media --list=//192.168.80.200 --grepable
You might get something like:
Domain=[ILUVATAR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
IPC|IPC$|Remote IPC
Disk|D$|Default share
Disk|print$|Printer Drivers
Disk|SharedDocs|
Disk|media|
Disk|ADMIN$|Remote Admin
Disk|C$|Default share
Disk|JLL|
Printer|Printer|HP LaserJet 1200 Series PCL
session request to 192.168.80.248 failed (Called name not present)
session request to 192 failed (Called name not present)
Domain=[ILUVATAR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
The greps and cuts pick out only the Disk shares, and slice out only the second field, which is the sharename. The last grep -q is a logical query, which will return a true status if that share name exists in the list... which is then tested using the if/fi on the next line. You can see it is running 3 separate tests.
The first 2 check 2 different ways to see if the share is visible - if neither approach works, it marks the share Offline. If at least one of them works, it moves on and attempts to see if the share is mountable - if that fails, it marks the share Offline. Only if at least one of the first 2 tests is successful AND the 3rd test is successful, does it mark the share Online.
So you need to simulate these commands, to see which of the conditions is failing for you. I suspect either the ping isn't working, or the shares are not visible (as even if the shares are mountable, if they are not visible, then the share is marked Offline.
Let me know if you need a more detailed explanation of any of this.