Simple shell script partition mounter Slackware

shell script ini buat mounting partisi di slackware 13, shell scpript ini juga di posting di projects.gxrg.org,. tapi masih ada bugsnya😀, gara-gara kurang huruf a duank,.jadi untuk yang fix nya ada disini,.

yang pake slackware juga, monggo dicoba😀,.klo masih ada yang salah maklum ane masih belajar,.

preview


Download Here -> mounter.sh

Shell Scriptnya :

001	clear
002	echo "            ~ G X R G ~    "
003	echo "(Gunadarma Xmalang Research Groups)"
004	echo
005	echo "what you want??"
006	echo "1. mount partition"
007	echo "2. unmount partition"
008	echo "3. Cancel"
009	echo -n "your choice : "
010	read pil
011
012	function mounting
013	{
014	clear
015	echo "partition on your system..."
016	cat /etc/fstab
017	echo "enter name partition ? "
018	echo "example : for /dev/sda2"
019	echo "          you can type : sda2"
020	echo -n "your choice :"
021	read hd
022	echo
023	echo
024	echo "where you like to mount partition"
025	echo "1. hd0"
026	echo "2. hd1"
027	echo "3. hd2"
028	echo -n "your choice :"
029	read dir
030	if [ $dir = 1 ]; then
031	  dira="hd0"
032	elif [ $dir = 2 ]; then
033	  dira="hd1"
034	else
035	  dira="hd2"
036	fi
037	echo
038	echo
039	echo "Type partition"
040	echo "1. Linux Partition (ext2, ext3, ext4, etc)"
041	echo "2. ntfs"
042	echo -n "your choice :"
043	read par
044	if [ $par = 1 ]; then
045	  part="mount"
046	else
047	  part="mount.ntfs-3g"
048	fi
049	echo
050	echo
051	clear
052	echo "mounting partition"
053	$part /dev/$hd /media/$dira
054	echo "mounting done for $hd to directori $dira [OK]"
055	echo
056	echo "thanks for using"
057	echo "~~[NEver-Mind]~~"
058	echo
059	echo "press any key for open partition"
060	read
061	dolphin /media/$dira
062	}
063
064	function umounting
065	{
066	clear
067	echo "unmount partition ?? "
068	echo "1. hd0"
069	echo "2. hd1"
070	echo "3. hd2"
071	echo -n "your choice :"
072	read dir
073	if [ $dir = 1 ]; then
074	  dira="hd0"
075	elif [ $dir = 2 ]; then
076	  dira="hd1"
077	else
078	  dira="hd2"
079	fi
080	echo
081	echo
082	clear
083	echo "unmounting partition Now"
084	umount /media/$dira
085	echo "unmounting for $hd to directori $dira  [OK]"
086	echo
087	echo "thanks for using"
088	echo "~~[NEver-Mind]~~"
089	read
090	dolphin /media/home
091	}
092
093	case $pil in
094	1)
095	  mounting;
096	  ;;
097	2)
098	  umounting;
099	  ;;
100	3)
101	  echo "thanks for using"
102	  echo "~~[NEver-Mind]~~"
103  	  read
104  	  ;;
105  	esac
Published in: on January 9, 2010 at 12:00 pm  Leave a Comment  
Tags: , , ,

The URI to TrackBack this entry is: https://nevermind86.wordpress.com/2010/01/09/shell-mounter-slackware/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: