Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- tmpfile=/tmp/tmpreadblkid
- blkid | grep "LABEL" > ${tmpfile}
- sed -ri -e 's/.*LABEL=//g' -e 's/UUID=//g' -e 's/"//g' -e 's/TYPE.*//g' ${tmpfile}
- while read p; do
- label=$(echo ${p} | cut -f1 -d' ')
- uuid=$(echo ${p} | cut -f2 -d' ')
- echo ${label}
- echo ${uuid}
- ln -s /dev/disk/by-uuid/${uuid} /mnt/${label}
- done <${tmpfile}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement