Migrate old style vservers to new style
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Thu, 13 May 2010 21:44:45 +0000 (21:44 +0000)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Thu, 13 May 2010 21:44:45 +0000 (21:44 +0000)
util-vserver-pl.spec

index a11f483..d886a87 100644 (file)
@@ -76,6 +76,10 @@ fi
 
 /usr/sbin/bwlimit init
 
+# Migrate old style vservers to new style
+pushd /etc/vservers
+for i in `ls /etc/vservers`; do echo "persistent,lback_allow" > $i/nflags; mkdir -p $i/sysctl/0; echo net.ipv4.ip_forward > $i/sysctl/0/setting; echo 1 > $i/sysctl/0/value; echo -e "persistent\n~info_init" > $i/cflags; done
+popd
 
 %postun
 # 0 = erase, 1 = upgrade