git://git.onelab.eu
/
vsys-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d53b628
)
Added script to set up custom distributions
author
Sapan Bhatia
<gwsapan@gmail.com>
Tue, 14 Feb 2012 21:48:27 +0000
(16:48 -0500)
committer
Sapan Bhatia
<gwsapan@gmail.com>
Tue, 14 Feb 2012 21:48:27 +0000
(16:48 -0500)
exec/switcheroo
[new file with mode: 0644]
patch
|
blob
diff --git a/exec/switcheroo
b/exec/switcheroo
new file mode 100644
(file)
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