Fixed permission handling and executable rights

This commit is contained in:
Superminaren 2025-12-08 11:10:24 +01:00
parent ea148f829d
commit 6a059448c9
3 changed files with 3 additions and 3 deletions

0
flash.sh Normal file → Executable file
View File

6
install.sh Normal file → Executable file
View File

@ -3,7 +3,7 @@
PACKAGES_DEBIAN="uhd-host" PACKAGES_DEBIAN="uhd-host"
PACKAGES_RHEL="uhd-tools uhd-devel uhd soapy-uhd" PACKAGES_RHEL="uhd-tools uhd-devel uhd soapy-uhd"
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "Error: This script must be run as root. Exiting." >&2 echo "Error: This script must be run with sudo as root. Exiting." >&2
exit 1 exit 1
fi fi
@ -50,8 +50,8 @@ export UHD_IMAGES_DIR=/usr/lib/ettus/
# Copying Firmware files # Copying Firmware files
mkdir /usr/lib/ettus/ # Create the library folder mkdir /usr/lib/ettus/ # Create the library folder
cp -r ./firmware/* /usr/lib/ettus/ # Copy firmware files cp -r ./firmware/* /usr/lib/ettus/ # Copy firmware files
chown -R root:root /usr/lib/ettus/ # Ensure root owns the files chown -R $USER:root /usr/lib/ettus/ # Ensure root owns the files
chmod 776 -R /usr/lib/ettus/ # This makes only root able to change the folder and file content chmod -R 776 /usr/lib/ettus/ # This makes only root able to change the folder and file content
uhd_find_devices # Needs to identify before it flashes uhd_find_devices # Needs to identify before it flashes
uhd_image_loader --download --args type=b200 # Flashes from the directory the file is in. uhd_image_loader --download --args type=b200 # Flashes from the directory the file is in.

0
prepare.sh Normal file → Executable file
View File