Last change
on this file since 191 was
191,
checked in by rock, 15 years ago
|
Add Function Code: generate PXE PV-VM configuration
|
File size:
621 bytes
|
Rev | Line | |
---|
[191] | 1 | #!/bin/bash |
---|
| 2 | # Program: |
---|
| 3 | # Function for drbl_PXE_PV-VM_create.sh |
---|
| 4 | # Author: |
---|
| 5 | # Jazz, Rock {jazz, rock}@nchc.org.tw |
---|
| 6 | # Version: |
---|
| 7 | # 1.0 |
---|
| 8 | # History: |
---|
| 9 | # 2010/07/20 Rock First release (1.0) |
---|
| 10 | |
---|
| 11 | # [Variable Declation] |
---|
| 12 | |
---|
| 13 | # [Check Root] |
---|
| 14 | function check_root(){ |
---|
| 15 | if [ $USER != "root" ]; then |
---|
| 16 | echo -e "Please change root to run it!" |
---|
| 17 | exit |
---|
| 18 | fi |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | function check_root_run(){ |
---|
| 23 | if [ $USER != "root" ]; then |
---|
| 24 | echo -e "Please change root to run it!" |
---|
| 25 | sudo su -c ~/"$0" "$@" |
---|
| 26 | exit |
---|
| 27 | fi |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | # [Check Parameter] |
---|
| 31 | #function check_parameters(){ |
---|
| 32 | #echo "fun $1" |
---|
| 33 | #if [ -z $(echo $1) ]; then |
---|
| 34 | #Usage && exit 2 |
---|
| 35 | #fi |
---|
| 36 | # |
---|
| 37 | #} |
---|
| 38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.