Skip to content

Commit

Permalink
explicitly check if user is root for usb rule install
Browse files Browse the repository at this point in the history
  • Loading branch information
snopf committed Feb 6, 2020
1 parent 51defaf commit 5c1faf9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/host/install_usb_rule.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

if (( $EUID != 0 )); then
echo "Please run as root"
exit
fi

echo "Copying 52-snopf.rules to /etc/udev.rules.d"
cp 52-snopf.rules /etc/udev/rules.d
echo "Reloading rules"
Expand Down

0 comments on commit 5c1faf9

Please sign in to comment.