bug 11351: move redundant router scripts to ramdisk

Then it can exempt from storage failure.
This commit is contained in:
Sheng Yang 2011-09-14 02:58:45 -07:00
parent d3b0f04877
commit 014e19546c
2 changed files with 8 additions and 5 deletions

View File

@ -332,10 +332,13 @@ setup_apache2() {
}
setup_redundant_router() {
rrouter_bin_path="/root/redundant_router"
rrouter_log="/root/keepalived.log"
rrouter_bin_path_str="\/root\/redundant_router"
rrouter_log_str="\/root\/keepalived.log"
rrouter_bin_path="/ramdisk/rrouter"
rrouter_log="/ramdisk/rrouter/keepalived.log"
rrouter_bin_path_str="\/ramdisk\/rrouter"
rrouter_log_str="\/ramdisk\/rrouter\/keepalived.log"
mkdir -p /ramdisk
mount tmpfs /ramdisk -t tmpfs
mkdir -p /ramdisk/rrouter
rm /tmp/rrouter.lock
ip route delete default
cp /root/redundant_router/keepalived.conf.templ /etc/keepalived/keepalived.conf

View File

@ -38,7 +38,7 @@ setup_redundant_router() {
then
return 1
fi
rrouter_bin_path="/root/redundant_router"
rrouter_bin_path="/ramdisk/rrouter"
eth2mac=`ip link show eth2 | awk '/ether/ {print $2}'`
sed -i "s/\[ETH2MAC\]/$eth2mac/g" $rrouter_bin_path/enable_pubip.sh
}