HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //usr/syno/etc.defaults/unbindusb.sh
#!/bin/sh
UNBIND_FILE="/sys/module/usbcore/drivers/usb:usb/unbind"
USBSTOR_DIR="/sys/module/usb_storage/drivers/usb:usb-storage/"
if [ ! -e ${UNBIND_FILE} -o ! -d ${USBSTOR_DIR} ]; then
  exit
fi

for file in `ls ${USBSTOR_DIR} | grep :`
do
  num=`echo ${file} | cut -d : -f 1`
  echo ${num} > ${UNBIND_FILE}
done