diff --git a/post_install.sh b/post_install.sh index b99435e2b..632ff6b6d 100755 --- a/post_install.sh +++ b/post_install.sh @@ -9,8 +9,19 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666" EOF } -if [ "$EUID" -ne 0 ] - then echo "Please run as root" +if [ "$EUID" -ne 0 ]; then + if [ -e "${PWD}/post_install.sh" ]; then + echo + echo "You might need to configure permissions for uploading." + echo "To do so, run the following command from the terminal:" + echo "sudo \"${PWD}/post_install.sh\"" + echo + else + # Script was executed from another path. It is assumed this will only occur when user is executing script directly. + # So it is not necessary to provide the command line. + echo "Please run as root" + fi + exit fi