Thursday 22 December 2011

BASH script to automate a process

BASH script to automate a process

I want to create a script that will:
  1. Create a Virtual Group and name it 00
  2. Create the following logical volumes:
  3. /usr
  4. /opt
  5. /bin
  6. /tmp
    Format the Logical Volumes (ext)
    and finally, mount the Logical Volumes

Code:

I was thinking something like:
white true; do
cd /
mkdir /usr
mount usr_lv /usr
done

But, I'm not really sure if that would be too effective.

No comments:

Post a Comment