Results 1 to 2 of 2
How do I setup an if-then command to examine if a device with a particular UUID is present?
Example:
Code:
if [ -e UUID=FE45-BA45 ]
then
sudo mkdir /media/userdrive/
sudo ...
- 07-22-2008 #1
Using if-then commands on a UUID
How do I setup an if-then command to examine if a device with a particular UUID is present?
Example:
Thanks again!Code:if [ -e UUID=FE45-BA45 ] then sudo mkdir /media/userdrive/ sudo mount -t ext3 -U FE45-BA45 /media/userdrive/ else echo echo "Drive not present." echo fi

- 07-26-2008 #2
Another win for the UUID system:
Solved.
blkid in puppy, probably vol_id in debian-types
This could be used for more devices, just add more if-then commands to the same script.Code:#!/bin/sh blkid > /home/username/.uuidcheck ############################# if grep 443A-426C "/home/username/.uuidcheck" then mkdir /media/woah mount -t vfat -U 443A-426C /media/woah fi



Reply With Quote