source:
drbl-virt/sbin/add_value
@
195
Last change on this file since 195 was 187, checked in by rock, 14 years ago | |
---|---|
File size: 491 bytes |
Rev | Line | |
---|---|---|
[185] | 1 | #!/bin/bash |
2 | # Program: | |
3 | # Add ip & hostname($1) to $2 | |
4 | # $1=/opt/drbl-virt/etc/IP_VM_ethX | |
5 | # $2=/etc/drbl/IP_HOST_TABLE | |
6 | # Author: | |
7 | # rock@nchc.org.tw | |
8 | # Version: | |
9 | # 1.0 | |
10 | # History: | |
11 | # 2010/06/07 Rock First release (1.0) | |
12 | ||
13 | ||
14 | # delete | |
[187] | 15 | sed -i "/# drbl-virt $3 add/d" $2 |
16 | sed -i "/# drbl-virt $3 end/d" $2 | |
[185] | 17 | |
18 | # | |
[187] | 19 | echo "# drbl-virt $3 add" >> $2 |
[185] | 20 | cat $1 >> $2 |
[187] | 21 | echo "# drbl-virt $3 end" >> $2 |
Note: See TracBrowser
for help on using the repository browser.