Skip to content

Commit aa9b907

Browse files
committed
Create usb directory if not present
1 parent 4f2974e commit aa9b907

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

installCDCACM.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ MODULEVERSION=$(echo $MAGICVERSION | cut -d " " -f 2)
77
KERNELVERSION=$(uname -r)
88
if [ "$MODULEVERSION" == "$KERNELVERSION" ]
99
then
10-
echo "Kernel and Module Versions Match"
10+
echo "Kernel and Module Versions Match; Installing ..."
1111
else
1212
echo "The Kernel version does not match the Module Version"
1313
echo "Kernel Version: " $KERNELVERSION
@@ -25,7 +25,10 @@ else
2525
echo "$ sudo modprobe -f cdc-acm"
2626
fi
2727
# Install the cdc-acm module
28-
sudo cp -v cdc-acm.ko /lib/modules/$(uname -r)/kernel/drivers/usb/class
28+
INSTALLDIRECTORY=/lib/modules/$(uname -r)/kernel/drivers/usb/class
29+
echo $INSTALLDIRECTORY
30+
sudo mkdir -p "$INSTALLDIRECTORY"
31+
sudo cp -v cdc-acm.ko $INSTALLDIRECTORY
2932
sudo depmod -a
3033
echo "Installed cdc-acm Module"
3134

0 commit comments

Comments
 (0)