flyingfishfinger DD-WRT Novice
Joined: 26 Feb 2023 Posts: 31
|
Posted: Tue May 09, 2023 15:13 Post subject: When is "USB Script" executed? |
|
Hi,
I'm having difficulty finding documentation on when the "USB Script" section of the Commands page is executed. What triggers it? Is it every time a USB device is detected / inserted? Once on startup when a device is first registered? Something else?
I put some commands there to execute a program which requires a USB device, but it seemingly doesn't get run.
I also tried putting the commands in the "Startup" script section, but I noticed the USB initialization takes ~ 20secs longer than the main boot so I'm not sure if the Startup section is already passed by the time the device appears.
If I log in via SSH and paste the exact same script post-boot, it runs fine.
(This isn't a script-specific question, more of a general "How does dd-wrt handle stuff in the Commands section?" issue)
Thanks,
R |
|
Alozaros DD-WRT Guru
Joined: 16 Nov 2015 Posts: 6447 Location: UK, London, just across the river..
|
Posted: Tue May 09, 2023 21:38 Post subject: |
|
usb script is triggered when usb is ready..
i use it, only for commands that must be read/executed from the USB...it makes sense...
you can add sleep command first, on the top of the USB script commands, so you know there is enough time before you triggered your commands:
sleep 20
you may need to fiddle with time, to make it work as you need... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913 |
|
mwchang DD-WRT Guru
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
|
|