16 lines
491 B
Bash
16 lines
491 B
Bash
|
# Array of lines to add to /etc/fstab
|
||
|
fstab_entries=(
|
||
|
"LABEL=storage /mnt/storage auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=storage 0 0"
|
||
|
)
|
||
|
|
||
|
# Iterate over the array and add each entry to /etc/fstab if it doesn't already exist
|
||
|
for entry in "${fstab_entries[@]}"; do
|
||
|
if ! grep -qF "$entry" /etc/fstab; then
|
||
|
echo "$entry" | sudo tee -a /etc/fstab > /dev/null
|
||
|
echo "Added entry: $entry"
|
||
|
else
|
||
|
echo "Entry already exists: $entry"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
sudo reboot
|