OSA: MOUNT & UNMOUNT

while(true)
do

echo    "  MENU
------------------------------------------------------------------------------
        1)Display mounted devices
2)Mount a device
3)Unmount a device
4)See physical name and instance number
5)Exit"

read choice
case $choice in

1) echo "Mounted devices are -> "
mount
;;

2) echo " MOUNT
-------------------------------------------------------------------------------
Enter the name of device -> "
read name
   echo "Enter the mount point -> "
read point
mount $name $point
echo "the device has been mounted successfully"
;;

3) echo " Unmount
-------------------------------------------------------------------------------
enter source of device ->"
read devsource
umount -f  $devsource
echo "the device has been unmounted successfully"
;;

4) echo " Physical name and instance number
-------------------------------------------------------------------------------
"
dmesg
;;

5) echo "Program has been terminated"
exit 0
;;

esac
done

Comments

Popular posts from this blog

NASM: program to find largest number from an array of 32-bit numbers(hard-coded)

Rules for drawing a FLOWCHART