From: Sapan Bhatia Date: Tue, 14 Feb 2012 21:48:27 +0000 (-0500) Subject: Added script to set up custom distributions X-Git-Tag: vsys-scripts-0.95-35~1 X-Git-Url: http://git.onelab.eu/?p=vsys-scripts.git;a=commitdiff_plain;h=a57bde0939193c31bb2e59fdd7bf26ccf13a2044 Added script to set up custom distributions --- diff --git a/exec/switcheroo b/exec/switcheroo new file mode 100644 index 0000000..6109c83 --- /dev/null +++ b/exec/switcheroo @@ -0,0 +1,13 @@ +#!/bin/sh + +RDIR="/vservers/$1/rootfs" + +if [ ! -d $RDIR ]; +then + echo "Please create a root filesystem in the $RDIR directory" +else + vserver $1 stop + mv /vservers/$1 /vservers/_$1 + mv /vservers/_$1/rootfs /vservers/$1 + vserver $1 start +fi