From 9ed651b0b4eeaf209beaed3fa8f59616404cc997 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Mon, 3 Feb 2020 22:03:35 -0600 Subject: [PATCH] Fix issue with devices that dont have USB --- rootfs/standard/usr/bin/mynode_startup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 3834cdad..da5a8f80 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -30,8 +30,9 @@ echo 'nameserver 8.8.4.4' >> /etc/resolv.conf echo 'nameserver 1.1.1.1' >> /etc/resolv.conf # Disable autosuspend for USB drives -for dev in /sys/bus/usb/devices/*/power/control; do echo "on" > $dev; done - +if [ -d /sys/bus/usb/devices/ ]; then + for dev in /sys/bus/usb/devices/*/power/control; do echo "on" > $dev; done +fi # Verify SD card permissions and folders are OK mkdir -p /home/admin/.config/