aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-09 16:44:20 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-09 16:44:20 +0000
commitbd5a14836a8967b9ff8b8ed1c14a0b1d8289ea52 (patch)
treeec801fc9d595e3cf483c564f0d1d9a0f6858ba52
parentf7595585fae0e0844877ad111388837aaf74028b (diff)
downloadsimplepkg-bd5a14836a8967b9ff8b8ed1c14a0b1d8289ea52.tar.gz
simplepkg-bd5a14836a8967b9ff8b8ed1c14a0b1d8289ea52.tar.bz2
lots of changes:
- jail-update renamed to jail-commit - mkjail, jail-commit and templatepkg with svn support - templates now has permission tracking - etc git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@164 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--conf/simplepkg.conf.new16
-rw-r--r--doc/CHANGELOG1
-rw-r--r--lib/common.sh64
-rwxr-xr-xsimplepkg.SlackBuild6
-rwxr-xr-xsrc/jail-commit93
-rwxr-xr-xsrc/jail-update64
-rwxr-xr-xsrc/mkjail103
-rwxr-xr-xtemplates/openoffice/openoffice.d/etc/profile.d/lang.csh (renamed from templates/openoffice.d/etc/profile.d/lang.csh)0
-rwxr-xr-xtemplates/openoffice/openoffice.d/etc/profile.d/lang.sh (renamed from templates/openoffice.d/etc/profile.d/lang.sh)0
l---------templates/openoffice/openoffice.d/opt/OpenOffice.org (renamed from templates/openoffice.d/opt/OpenOffice.org)0
-rwxr-xr-xtemplates/openoffice/openoffice.s/post-install.sh (renamed from templates/openoffice.s/post-install.sh)0
-rw-r--r--templates/openoffice/openoffice.template (renamed from templates/openoffice.template)0
-rw-r--r--templates/slackware/slackware.template (renamed from templates/slackware.template)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/apache/httpd.conf (renamed from templates/vserver-legacy.d/etc/apache/httpd.conf)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/apache/php.ini (renamed from templates/vserver-legacy.d/etc/apache/php.ini)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/apache/vhosts (renamed from templates/vserver-legacy.d/etc/apache/vhosts)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/hosts (renamed from templates/vserver-legacy.d/etc/hosts)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/logrotate.d/apache (renamed from templates/vserver-legacy.d/etc/logrotate.d/apache)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/profile (renamed from templates/vserver-legacy.d/etc/profile)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0 (renamed from templates/vserver-legacy.d/etc/rc.d/rc.0)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.4 (renamed from templates/vserver-legacy.d/etc/rc.d/rc.4)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.6 (renamed from templates/vserver-legacy.d/etc/rc.d/rc.6)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.K (renamed from templates/vserver-legacy.d/etc/rc.d/rc.K)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.M (renamed from templates/vserver-legacy.d/etc/rc.d/rc.M)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.S (renamed from templates/vserver-legacy.d/etc/rc.d/rc.S)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.httpd (renamed from templates/vserver-legacy.d/etc/rc.d/rc.httpd)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.inet2 (renamed from templates/vserver-legacy.d/etc/rc.d/rc.inet2)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.inetd (renamed from templates/vserver-legacy.d/etc/rc.d/rc.inetd)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.ip_forward (renamed from templates/vserver-legacy.d/etc/rc.d/rc.ip_forward)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.local (renamed from templates/vserver-legacy.d/etc/rc.d/rc.local)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld (renamed from templates/vserver-legacy.d/etc/rc.d/rc.mysqld)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.postfix (renamed from templates/vserver-legacy.d/etc/rc.d/rc.postfix)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail (renamed from templates/vserver-legacy.d/etc/rc.d/rc.sendmail)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.serial (renamed from templates/vserver-legacy.d/etc/rc.d/rc.serial)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sshd (renamed from templates/vserver-legacy.d/etc/rc.d/rc.sshd)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.syslog (renamed from templates/vserver-legacy.d/etc/rc.d/rc.syslog)0
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit (renamed from templates/vserver-legacy.d/etc/rc.d/rc.sysvinit)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/rssh.conf (renamed from templates/vserver-legacy.d/etc/rssh.conf)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/etc/ssh/sshd_config (renamed from templates/vserver-legacy.d/etc/ssh/sshd_config)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/var/www/htdocs/missing.html (renamed from templates/vserver-legacy.d/var/www/htdocs/missing.html)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.d/var/www/missing.html (renamed from templates/vserver-legacy.d/var/www/missing.html)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.s/GPG-KEY (renamed from templates/vserver-legacy.s/GPG-KEY)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.s/devices.tar.gz (renamed from templates/vserver-legacy.s/devices.tar.gz)bin322 -> 322 bytes
-rw-r--r--templates/vserver-legacy/vserver-legacy.s/skel.conf (renamed from templates/vserver-legacy.s/skel.conf)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh (renamed from templates/vserver-legacy.s/vserver-legacy.sh)0
-rw-r--r--templates/vserver-legacy/vserver-legacy.template (renamed from templates/vserver-legacy.template)0
-rw-r--r--templates/vserver/vserver.d/etc/apache/httpd.conf (renamed from templates/vserver.d/etc/apache/httpd.conf)0
-rw-r--r--templates/vserver/vserver.d/etc/apache/php.ini (renamed from templates/vserver.d/etc/apache/php.ini)0
-rw-r--r--templates/vserver/vserver.d/etc/apache/vhosts (renamed from templates/vserver.d/etc/apache/vhosts)0
-rw-r--r--templates/vserver/vserver.d/etc/hosts (renamed from templates/vserver.d/etc/hosts)0
-rw-r--r--templates/vserver/vserver.d/etc/logrotate.d/apache (renamed from templates/vserver.d/etc/logrotate.d/apache)0
-rw-r--r--templates/vserver/vserver.d/etc/profile (renamed from templates/vserver.d/etc/profile)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc (renamed from templates/vserver.d/etc/rc.d/rc)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.0 (renamed from templates/vserver.d/etc/rc.d/rc.0)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.4 (renamed from templates/vserver.d/etc/rc.d/rc.4)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.6 (renamed from templates/vserver.d/etc/rc.d/rc.6)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.K (renamed from templates/vserver.d/etc/rc.d/rc.K)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.M (renamed from templates/vserver.d/etc/rc.d/rc.M)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.S (renamed from templates/vserver.d/etc/rc.d/rc.S)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.httpd (renamed from templates/vserver.d/etc/rc.d/rc.httpd)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.inet2 (renamed from templates/vserver.d/etc/rc.d/rc.inet2)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.inetd (renamed from templates/vserver.d/etc/rc.d/rc.inetd)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.ip_forward (renamed from templates/vserver.d/etc/rc.d/rc.ip_forward)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.local (renamed from templates/vserver.d/etc/rc.d/rc.local)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.mysqld (renamed from templates/vserver.d/etc/rc.d/rc.mysqld)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.postfix (renamed from templates/vserver.d/etc/rc.d/rc.postfix)0
-rw-r--r--templates/vserver/vserver.d/etc/rc.d/rc.sendmail (renamed from templates/vserver.d/etc/rc.d/rc.sendmail)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.serial (renamed from templates/vserver.d/etc/rc.d/rc.serial)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.sshd (renamed from templates/vserver.d/etc/rc.d/rc.sshd)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.syslog (renamed from templates/vserver.d/etc/rc.d/rc.syslog)0
-rwxr-xr-xtemplates/vserver/vserver.d/etc/rc.d/rc.sysvinit (renamed from templates/vserver.d/etc/rc.d/rc.sysvinit)0
-rw-r--r--templates/vserver/vserver.d/etc/rssh.conf (renamed from templates/vserver.d/etc/rssh.conf)0
-rw-r--r--templates/vserver/vserver.d/etc/ssh/sshd_config (renamed from templates/vserver.d/etc/ssh/sshd_config)0
-rw-r--r--templates/vserver/vserver.d/var/www/htdocs/missing.html (renamed from templates/vserver.d/var/www/htdocs/missing.html)0
-rw-r--r--templates/vserver/vserver.d/var/www/missing.html (renamed from templates/vserver.d/var/www/missing.html)0
-rw-r--r--templates/vserver/vserver.s/GPG-KEY (renamed from templates/vserver.s/GPG-KEY)0
-rw-r--r--templates/vserver/vserver.s/devices.tar.gz (renamed from templates/vserver.s/devices.tar.gz)bin320 -> 320 bytes
-rw-r--r--templates/vserver/vserver.s/vserver.sh (renamed from templates/vserver.s/vserver.sh)0
-rw-r--r--templates/vserver/vserver.template (renamed from templates/vserver.template)0
79 files changed, 252 insertions, 95 deletions
diff --git a/conf/simplepkg.conf.new b/conf/simplepkg.conf.new
index f590feb..28af9a7 100644
--- a/conf/simplepkg.conf.new
+++ b/conf/simplepkg.conf.new
@@ -94,6 +94,22 @@ CONSIDER_ALL_PACKAGES_AS_PATCHES="0"
# stored in the same tree.
STORE_ROOT_PATCHES_ON_PATCHES_DIR="0"
+# Set to yes if your templates will be placed in a subversion repository
+# This just work if TEMPLATE_STORAGE_STYLE is set to own-folder (default)
+TEMPLATES_UNDER_SVN="no"
+
# Where your templates will be located
+# Dont change it except you know what you're doing.
TEMPLATE_FOLDER="/etc/simplepkg/templates"
+# This variable controls in which folder / subfolder your templates will
+# be stored. Possible values are:
+#
+# - simplepkg-folder: templates are stored at /etc/simplepkg
+# - templates-folder: templates are stored at /etc/simplepkg/templates
+# - own-folder: each template stored at its own folder
+# at /etc/simplepkg/templates/template-name
+#
+# This variable has backwards purposes only, so dont change it.
+TEMPLATE_STORAGE_STYLE="own-folder"
+
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index c64e5fc..8797935 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -12,6 +12,7 @@ simplepkg changelog
- /etc/simplepkg/template_name.template
- /etc/simplepkg/templates/template_name.template
- /etc/simplepkg/templates/template_name/template_name.template
+ jail-update: renamed to jail-commit
0.4.9pre18-23: simplaret:
- enhanced http retrieval: curl support
diff --git a/lib/common.sh b/lib/common.sh
index 5b82469..fc62611 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -199,9 +199,7 @@ function eval_config {
HTTP_TOOL="`eval_parameter HTTP_TOOL curl`"
CONNECT_TIMEOUT="`eval_parameter CONNECT_TIMEOUT 0`"
TEMPLATE_FOLDER="`eval_parameter TEMPLATE_BASE /etc/simplepkg/templates`"
-
- # TODO: also add this stuff in simplepkg.conf.new
- # TEMPLATE_STORAGE_STYLE
+ TEMPLATE_STORAGE_STYLE="`eval_parameter TEMPLATE_STORAGE_STYLE own_folder`"
SIMPLARET_CLEAN="`eval_boolean_parameter SIMPLARET_CLEAN 1`"
SIMPLARET_DELETE_DOWN="`eval_boolean_parameter SIMPLARET_DELETE_DOWN 1`"
@@ -212,6 +210,7 @@ function eval_config {
WARNING="`eval_boolean_parameter WARNING 0`"
SIGNATURE_CHECKING="`eval_boolean_parameter SIGNATURE_CHECKING 0`"
DEPENDENCY_CHECKING="`eval_boolean_parameter DEPENDENCY_CHECKING 1`"
+ TEMPLATES_UNDER_SVN="`eval_boolean_parameter TEMPLATES_UNDER_SVN 0`"
# Enabling this option (i.e, setting to "1" or "yes"), simplaret will
# donwload even # already applied patches, a good option when you plan
@@ -283,6 +282,12 @@ function eval_config {
echo "$SIMPLARET not found, please install it before run $0"
fi
+ if [ "$TEMPLATE_STORAGE_STYLE" != "simplepkg-folder" ] && \
+ [ "$TEMPLATE_STORAGE_STYLE" != "templates-folder" ] && \
+ [ "$TEMPLATE_STORAGE_STYLE" != "own-folder" ]; then
+ TEMPLATE_STORAGE_STYLE="own-folder"
+ fi
+
}
function default_version {
@@ -329,7 +334,7 @@ function search_default_template {
function search_template {
# determine the template to be used
- # usage: <search-template> <template-name> [--new]
+ # usage: <search-template> <template-name> [--new | --update]
#
# templates can be stored either on
@@ -348,9 +353,16 @@ function search_template {
else
if [ "$2" == "--new" ]; then
# we need to return the path for a new template
- # TODO: set a path for the new template
- # TODO: TEMPLATE_STORAGE_STYLE
- true
+ if [ "$TEMPLATE_STORAGE_STYLE" == "simplepkg-folder" ]; then
+ TEMPLATE_BASE="$BASE_CONF/$1"
+ elif [ "$TEMPLATE_STORAGE_STYLE" == "templates-folder" ]; then
+ TEMPLATE_BASE="$BASE_CONF/templates/$1"
+ else
+ TEMPLATE_BASE="$BASE_CONF/templates/$1/$1"
+ mkdir -p $BASE_CONF/templates/$1
+ fi
+ elif [ "$2" == "--update" ]
+ return 1
else
echo $BASENAME: template $1 not found
search_default_template
@@ -359,3 +371,41 @@ function search_template {
}
+function numeric_perm {
+
+ # get the numeric permission of a file
+ # usage: numeric_perm <file-name>
+
+ # just a bit of forbidden secrets
+
+ if [ -a "$file" ]; then
+ ls -ln $file | awk '{ print $1 }' | \
+ sed -e 's/^.//' -e 's/r/4/g' -e 's/w/2/g' -e 's/x/1/g'
+ -e 's/-/0/g' -e 's/\(.\)\(.\)\(.\)/\1+\2+\3/g' | \
+ fold -w5 | bc -l | xargs | sed -e 's/ //g'
+ fi
+
+}
+
+function get_owner {
+
+ # get the numeric owner for a file
+ # usage: get_owner <file>
+
+ if [ -a "$1" ]; then
+ ls -ln $1 | awk '{ print $3 }'
+ fi
+
+}
+
+function get_group {
+
+ # get the numeric group for a file
+ # usage: get_group <file>
+
+ if [ -a "$1" ]; then
+ ls -ln $1 | awk '{ print $4 }'
+ fi
+
+}
+
diff --git a/simplepkg.SlackBuild b/simplepkg.SlackBuild
index c3a392b..da4c496 100755
--- a/simplepkg.SlackBuild
+++ b/simplepkg.SlackBuild
@@ -10,9 +10,9 @@ VERSION="0.4.9pre24"
ARCH="noarch"
LIBEXEC="/usr/libexec/$PACKAGE"
BINDIR="/usr/bin"
-BINARY_LIST="simplaret repos"
+BINARY_LIST="simplaret repos lspkg"
SBINDIR="/usr/sbin"
-SBINARY_LIST="mkjail templatepkg jail-update jail-upgrade lspkg metapkg rebuildpkg createpkg"
+SBINARY_LIST="mkjail templatepkg jail-update jail-commit metapkg rebuildpkg createpkg"
LIB_LIST="common.sh"
DOC_DIR="/usr/doc"
DOC_LIST="COPYING TODO CHANGELOG README README.pt_BR README.simplaret README.simplaret.pt_BR"
@@ -49,7 +49,7 @@ done
# especifico do simplepkg
mkdir -p $PACK_DIR/etc/$PACKAGE/
-rsync -av --exclude=.svn templates/* $PACK_DIR/etc/$PACKAGE/
+rsync -av --exclude=.svn templates/* $PACK_DIR/etc/$PACKAGE/templates/
chmod +x $PACK_DIR/etc/$PACKAGE/vserver.s/*.sh
chmod +x $PACK_DIR/etc/$PACKAGE/vserver-legacy.s/*.sh
cp conf/simplepkg.conf.new $PACK_DIR/etc/$PACKAGE
diff --git a/src/jail-commit b/src/jail-commit
new file mode 100755
index 0000000..b48a0f9
--- /dev/null
+++ b/src/jail-commit
@@ -0,0 +1,93 @@
+#!/bin/bash
+#
+# jail-update: update config files from a jail to a template
+# feedback: rhatto@riseup.net | gpl
+#
+# Jail-update is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or any later version.
+#
+# Jail-update is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+
+COMMON="/usr/libexec/simplepkg/common.sh"
+
+if [ -f "$COMMON" ]; then
+ source $COMMON
+else
+ echo "error: file $COMMON found, check your `basename $0` installation"
+ exit 1
+fi
+
+function template_merge {
+
+ # copy differences between the jail
+ # and the template in the template folder
+
+ # usage: template_merge <jail-path>
+
+ if [ -z "$1" ] || [ ! -d "$TEMPLATE_BASE.d" ]; then
+ return 1
+ fi
+
+ rm -f $TEMPLATE_BASE.perms
+ touch $TEMPLATE_BASE.perms
+ cd $TEMPLATE_BASE.d
+
+ for file in `find`; do
+ if [[ -f "$file" && -f "$1/$file" ]]; then
+ if ! diff $file $1/$file; then
+ echo updating $file
+ cp -af $1/$file $file
+ perms="`numeric_perm $1/$file`"
+ owner="`get_owner $1/$file`"
+ group="`get_group $1/$file`"
+ echo "$file;$owner;$group;$perms" >> $TEMPLATE_BASE.perms
+ fi
+ fi
+ done
+
+}
+
+function template_svn_commit {
+
+ if [ "$TEMPLATES_UNDER_SVN" == "1" ] && \
+ [ "$TEMPLATE_STORAGE_STYLE" == "own-folder" ]; then
+ cd `basedir $TEMPLATE_BASE`
+ svn commit -m "changes for `date`"
+ fi
+
+}
+
+if [ -f $JAIL_LIST ]; then
+ for jailpath in `cat $JAIL_LIST`; do
+ jail="`basename $jailpath`"
+ search_template $jail --update
+ if [ "$?" == "0" ]; then
+ echo updating $jailpath...
+ if [ -d "$TEMPLATE_BASE.d" ] || [ -a "$TEMPLATE_BASE.template" ]; then
+ templatepkg -a $jail $jailpath
+ template_merge $jailpath
+ template_svn_commit $TEMPLATE_BASE
+ fi
+ fi
+ done
+fi
+
+# main jail
+search_template main --update
+if [ "$?" == "0" ]; then
+ if [ -a "$TEMPLATE_BASE.template" ] || [ -a "$TEMPLATE_BASE.template" ]; then
+ echo updating main installation...
+ templatepkg -a main
+ template_merge /
+ template_svn_commit $TEMPLATE_BASE
+ fi
+fi
+
diff --git a/src/jail-update b/src/jail-update
deleted file mode 100755
index 07d1d1b..0000000
--- a/src/jail-update
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-#
-# jail-update: update config files from a jail to a template
-# feedback: rhatto@riseup.net | gpl
-#
-# Jail-update is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or any later version.
-#
-# Jail-update is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place - Suite 330, Boston, MA 02111-1307, USA
-#
-
-COMMON="/usr/libexec/simplepkg/common.sh"
-
-if [ -f "$COMMON" ]; then
- source $COMMON
-else
- echo "error: file $COMMON found, check your `basename $0` installation"
- exit 1
-fi
-
-# TODO: get the correct template folder
-
-if [ -f $JAIL_LIST ]; then
- for jailpath in `cat $JAIL_LIST`; do
- jail="`basename $jailpath`"
- echo updating $jailpath...
- if [ -d "$BASE_CONF/$jail.d" ] || [ -a "$BASE_CONF/$jail.template" ]; then
- templatepkg -a $jail $jailpath
- cd $BASE_CONF/$jail.d
- for file in `find`; do
- if [[ -f "$file" && -f "$jailpath/$file" ]]; then
- if ! diff $file $jailpath/$file; then
- echo updating $file
- cp -f $jailpath/$file $file
- fi
- fi
- done
- fi
- done
-fi
-
-# main jail
-if [ -a "$BASE_CONF/main.template" ]; then
- echo updating main installation...
- templatepkg -a main
-fi
-if [ -d "$BASE_CONF/main.d" ]; then
- cd $BASE_CONF/main.d
- for file in `find`; do
- if [[ -f "$file" && -f "/$file" ]]; then
- if ! diff $file /$file; then
- echo updating $file
- cp -f /$file $file
- fi
- fi
- done
-fi
diff --git a/src/mkjail b/src/mkjail
index 0f9834d..0b6adb3 100755
--- a/src/mkjail
+++ b/src/mkjail
@@ -20,11 +20,6 @@
COMMON="/usr/libexec/simplepkg/common.sh"
BASENAME="`basename $0`"
-function usage {
- echo "usage: [ARCH=arch] [VERSION=version] [ROOT=/otherroot] $BASENAME <jail-name> [template]"
- exit 1
-}
-
if [ -f "$COMMON" ]; then
source $COMMON
else
@@ -32,11 +27,87 @@ else
exit 1
fi
+function usage {
+
+ echo "usage: [ARCH=arch] [VERSION=version] [ROOT=/otherroot] $BASENAME <jail-name> [template]"
+ exit 1
+
+}
+
+function copy_template_files {
+
+ # copy template files into jail
+ # usage: copy_template_files <jail-path>
+
+ if [ -d "$1" ]; then
+ echo "$BASENAME: copying template files..."
+ if [ -d "$TEMPLATE_BASE.d" ]; then
+ if [ "$TEMPLATES_UNDER_SVN" == "1" ]; then
+ rsync -av --exclude=.svn $TEMPLATE_BASE.d/ $JAIL_ROOT/$server/
+ else
+ rsync -av $TEMPLATE_BASE.d/ $JAIL_ROOT/$server/
+ fi
+ fi
+ fi
+
+}
+
+function set_jail_perms {
+
+ # set template file permissions under a jail
+ # usage: set_jail_perms <jail-path>
+
+ if [ -s "$TEMPLATE_BASE.perms" ]; then
+ cat $TEMPLATE_BASE.perms | while read entry; do
+ file="`echo $entry | cut -d ";" -f 1`"
+ if [ -a "$TEMPLATE_BASE.d/$file" ] && [ -a "$1/$file" ]; then
+ owner="`echo entry | cut -d ";" -f 2`"
+ group="`echo entry | cut -d ";" -f 3`"
+ perms="`echo entry | cut -d ";" -f 4`"
+ chmod $perms $1/$file
+ chown $owner:$group $1/$file
+ fi
+ done
+ fi
+
+}
+
+function exec_post_install_scripts {
+
+ # exec post installation scripts
+ # usage: exec_post_install_script <jail-root> <jail-name>
+
+ if [ -z "$2" ]; then
+ return 1
+ fi
+
+ echo "$BASENAME: executing template scripts..."
+ if [ -d "$TEMPLATE_BASE.s" ]; then
+ for script in `ls $TEMPLATE_BASE.s/`; do
+ if [ -x "$TEMPLATE_BASE.s/$script" ]; then
+ exec $TEMPLATE_BASE.s/$script $1 $2
+ fi
+ done
+ fi
+
+}
+
+function jailist_update {
+
+ # update the jail list file
+ # usage: jailist_update <jail-path>
+
+ if ! grep -q "^$1" $JAIL_LIST; then
+ echo $1 >> $JAIL_LIST
+ fi
+
+}
+
if [ -z "$1" ]; then
usage
else
server="$1"
- eval_config `basename $0` -u
+ eval_config $BASENAME -u
fi
if [ ! -z "$2" ]; then
@@ -64,22 +135,12 @@ else
fi
echo "$BASENAME: instaling packages into $JAIL_ROOT/$server using $TEMPLATE..."
-install_packages
-echo "$BASENAME: copying template files..."
-if [ -d "$TEMPLATE_BASE.d" ]; then
- rsync -av $TEMPLATE_BASE.d/ $JAIL_ROOT/$server/
-fi
-
-echo "$BASENAME: executing template scripts..."
-if [ -d "$TEMPLATE.s" ]; then
- for script in `ls $TEMPLATE.s/`; do
- if [ -x "$TEMPLATE_BASE.s/$script" ]; then
- exec $TEMPLATE_BASE.s/$script $JAIL_ROOT $server
- fi
- done
-fi
+install_packages
+copy_template_files $JAIL_ROOT/$server
+set_jail_perms $JAIL_ROOT/$server
+exec_post_install_scripts $JAIL_ROOT $server
+jailist_update $JAIL_ROOT/$server
-echo $JAIL_ROOT/$server >> $JAIL_LIST
echo $BASENAME: done creating $server jail
diff --git a/templates/openoffice.d/etc/profile.d/lang.csh b/templates/openoffice/openoffice.d/etc/profile.d/lang.csh
index 94e8a92..94e8a92 100755
--- a/templates/openoffice.d/etc/profile.d/lang.csh
+++ b/templates/openoffice/openoffice.d/etc/profile.d/lang.csh
diff --git a/templates/openoffice.d/etc/profile.d/lang.sh b/templates/openoffice/openoffice.d/etc/profile.d/lang.sh
index c9cde20..c9cde20 100755
--- a/templates/openoffice.d/etc/profile.d/lang.sh
+++ b/templates/openoffice/openoffice.d/etc/profile.d/lang.sh
diff --git a/templates/openoffice.d/opt/OpenOffice.org b/templates/openoffice/openoffice.d/opt/OpenOffice.org
index 7146afd..7146afd 120000
--- a/templates/openoffice.d/opt/OpenOffice.org
+++ b/templates/openoffice/openoffice.d/opt/OpenOffice.org
diff --git a/templates/openoffice.s/post-install.sh b/templates/openoffice/openoffice.s/post-install.sh
index 086c7a4..086c7a4 100755
--- a/templates/openoffice.s/post-install.sh
+++ b/templates/openoffice/openoffice.s/post-install.sh
diff --git a/templates/openoffice.template b/templates/openoffice/openoffice.template
index ef3ae52..ef3ae52 100644
--- a/templates/openoffice.template
+++ b/templates/openoffice/openoffice.template
diff --git a/templates/slackware.template b/templates/slackware/slackware.template
index c3590c1..c3590c1 100644
--- a/templates/slackware.template
+++ b/templates/slackware/slackware.template
diff --git a/templates/vserver-legacy.d/etc/apache/httpd.conf b/templates/vserver-legacy/vserver-legacy.d/etc/apache/httpd.conf
index 7b7115d..7b7115d 100644
--- a/templates/vserver-legacy.d/etc/apache/httpd.conf
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/apache/httpd.conf
diff --git a/templates/vserver-legacy.d/etc/apache/php.ini b/templates/vserver-legacy/vserver-legacy.d/etc/apache/php.ini
index e6cddef..e6cddef 100644
--- a/templates/vserver-legacy.d/etc/apache/php.ini
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/apache/php.ini
diff --git a/templates/vserver-legacy.d/etc/apache/vhosts b/templates/vserver-legacy/vserver-legacy.d/etc/apache/vhosts
index e69de29..e69de29 100644
--- a/templates/vserver-legacy.d/etc/apache/vhosts
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/apache/vhosts
diff --git a/templates/vserver-legacy.d/etc/hosts b/templates/vserver-legacy/vserver-legacy.d/etc/hosts
index 6e33147..6e33147 100644
--- a/templates/vserver-legacy.d/etc/hosts
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/hosts
diff --git a/templates/vserver-legacy.d/etc/logrotate.d/apache b/templates/vserver-legacy/vserver-legacy.d/etc/logrotate.d/apache
index f31fbe2..f31fbe2 100644
--- a/templates/vserver-legacy.d/etc/logrotate.d/apache
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/logrotate.d/apache
diff --git a/templates/vserver-legacy.d/etc/profile b/templates/vserver-legacy/vserver-legacy.d/etc/profile
index 563594a..563594a 100644
--- a/templates/vserver-legacy.d/etc/profile
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/profile
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.0 b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0
index bfec90a..bfec90a 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.0
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.0
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.4 b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.4
index b972052..b972052 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.4
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.4
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.6 b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.6
index bfec90a..bfec90a 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.6
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.6
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.K b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.K
index 00a1501..00a1501 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.K
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.K
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.M b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.M
index 0cb3343..0cb3343 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.M
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.M
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.S b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.S
index 05c75b4..05c75b4 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.S
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.S
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.httpd b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.httpd
index 00b8837..00b8837 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.httpd
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.httpd
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.inet2 b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.inet2
index db56589..db56589 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.inet2
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.inet2
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.inetd b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.inetd
index 9fe1419..9fe1419 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.inetd
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.inetd
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.ip_forward b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.ip_forward
index 52bd2fe..52bd2fe 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.ip_forward
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.ip_forward
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.local b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.local
index 3cf2076..3cf2076 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.local
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.local
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.mysqld b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld
index 239e2e6..239e2e6 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.mysqld
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.mysqld
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.postfix b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.postfix
index bc32367..bc32367 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.postfix
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.postfix
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.sendmail b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail
index 1a31c52..1a31c52 100644
--- a/templates/vserver-legacy.d/etc/rc.d/rc.sendmail
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.serial b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.serial
index 5f31c01..5f31c01 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.serial
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.serial
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.sshd b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sshd
index a3707e3..a3707e3 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.sshd
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sshd
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.syslog b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.syslog
index a005fb7..a005fb7 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.syslog
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.syslog
diff --git a/templates/vserver-legacy.d/etc/rc.d/rc.sysvinit b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit
index 916e59e..916e59e 100755
--- a/templates/vserver-legacy.d/etc/rc.d/rc.sysvinit
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit
diff --git a/templates/vserver-legacy.d/etc/rssh.conf b/templates/vserver-legacy/vserver-legacy.d/etc/rssh.conf
index a74acc6..a74acc6 100644
--- a/templates/vserver-legacy.d/etc/rssh.conf
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rssh.conf
diff --git a/templates/vserver-legacy.d/etc/ssh/sshd_config b/templates/vserver-legacy/vserver-legacy.d/etc/ssh/sshd_config
index a161fec..a161fec 100644
--- a/templates/vserver-legacy.d/etc/ssh/sshd_config
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/ssh/sshd_config
diff --git a/templates/vserver-legacy.d/var/www/htdocs/missing.html b/templates/vserver-legacy/vserver-legacy.d/var/www/htdocs/missing.html
index b2eec17..b2eec17 100644
--- a/templates/vserver-legacy.d/var/www/htdocs/missing.html
+++ b/templates/vserver-legacy/vserver-legacy.d/var/www/htdocs/missing.html
diff --git a/templates/vserver-legacy.d/var/www/missing.html b/templates/vserver-legacy/vserver-legacy.d/var/www/missing.html
index b2eec17..b2eec17 100644
--- a/templates/vserver-legacy.d/var/www/missing.html
+++ b/templates/vserver-legacy/vserver-legacy.d/var/www/missing.html
diff --git a/templates/vserver-legacy.s/GPG-KEY b/templates/vserver-legacy/vserver-legacy.s/GPG-KEY
index fd23e95..fd23e95 100644
--- a/templates/vserver-legacy.s/GPG-KEY
+++ b/templates/vserver-legacy/vserver-legacy.s/GPG-KEY
diff --git a/templates/vserver-legacy.s/devices.tar.gz b/templates/vserver-legacy/vserver-legacy.s/devices.tar.gz
index 992ba79..992ba79 100644
--- a/templates/vserver-legacy.s/devices.tar.gz
+++ b/templates/vserver-legacy/vserver-legacy.s/devices.tar.gz
Binary files differ
diff --git a/templates/vserver-legacy.s/skel.conf b/templates/vserver-legacy/vserver-legacy.s/skel.conf
index 73985d3..73985d3 100644
--- a/templates/vserver-legacy.s/skel.conf
+++ b/templates/vserver-legacy/vserver-legacy.s/skel.conf
diff --git a/templates/vserver-legacy.s/vserver-legacy.sh b/templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh
index f243ea0..f243ea0 100644
--- a/templates/vserver-legacy.s/vserver-legacy.sh
+++ b/templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh
diff --git a/templates/vserver-legacy.template b/templates/vserver-legacy/vserver-legacy.template
index b810e32..b810e32 100644
--- a/templates/vserver-legacy.template
+++ b/templates/vserver-legacy/vserver-legacy.template
diff --git a/templates/vserver.d/etc/apache/httpd.conf b/templates/vserver/vserver.d/etc/apache/httpd.conf
index 7b7115d..7b7115d 100644
--- a/templates/vserver.d/etc/apache/httpd.conf
+++ b/templates/vserver/vserver.d/etc/apache/httpd.conf
diff --git a/templates/vserver.d/etc/apache/php.ini b/templates/vserver/vserver.d/etc/apache/php.ini
index e6cddef..e6cddef 100644
--- a/templates/vserver.d/etc/apache/php.ini
+++ b/templates/vserver/vserver.d/etc/apache/php.ini
diff --git a/templates/vserver.d/etc/apache/vhosts b/templates/vserver/vserver.d/etc/apache/vhosts
index e69de29..e69de29 100644
--- a/templates/vserver.d/etc/apache/vhosts
+++ b/templates/vserver/vserver.d/etc/apache/vhosts
diff --git a/templates/vserver.d/etc/hosts b/templates/vserver/vserver.d/etc/hosts
index 6e33147..6e33147 100644
--- a/templates/vserver.d/etc/hosts
+++ b/templates/vserver/vserver.d/etc/hosts
diff --git a/templates/vserver.d/etc/logrotate.d/apache b/templates/vserver/vserver.d/etc/logrotate.d/apache
index f31fbe2..f31fbe2 100644
--- a/templates/vserver.d/etc/logrotate.d/apache
+++ b/templates/vserver/vserver.d/etc/logrotate.d/apache
diff --git a/templates/vserver.d/etc/profile b/templates/vserver/vserver.d/etc/profile
index 563594a..563594a 100644
--- a/templates/vserver.d/etc/profile
+++ b/templates/vserver/vserver.d/etc/profile
diff --git a/templates/vserver.d/etc/rc.d/rc b/templates/vserver/vserver.d/etc/rc.d/rc
index eefbcc5..eefbcc5 100755
--- a/templates/vserver.d/etc/rc.d/rc
+++ b/templates/vserver/vserver.d/etc/rc.d/rc
diff --git a/templates/vserver.d/etc/rc.d/rc.0 b/templates/vserver/vserver.d/etc/rc.d/rc.0
index bfec90a..bfec90a 100755
--- a/templates/vserver.d/etc/rc.d/rc.0
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.0
diff --git a/templates/vserver.d/etc/rc.d/rc.4 b/templates/vserver/vserver.d/etc/rc.d/rc.4
index b972052..b972052 100644
--- a/templates/vserver.d/etc/rc.d/rc.4
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.4
diff --git a/templates/vserver.d/etc/rc.d/rc.6 b/templates/vserver/vserver.d/etc/rc.d/rc.6
index bfec90a..bfec90a 100755
--- a/templates/vserver.d/etc/rc.d/rc.6
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.6
diff --git a/templates/vserver.d/etc/rc.d/rc.K b/templates/vserver/vserver.d/etc/rc.d/rc.K
index 00a1501..00a1501 100755
--- a/templates/vserver.d/etc/rc.d/rc.K
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.K
diff --git a/templates/vserver.d/etc/rc.d/rc.M b/templates/vserver/vserver.d/etc/rc.d/rc.M
index 0cb3343..0cb3343 100755
--- a/templates/vserver.d/etc/rc.d/rc.M
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.M
diff --git a/templates/vserver.d/etc/rc.d/rc.S b/templates/vserver/vserver.d/etc/rc.d/rc.S
index 05c75b4..05c75b4 100755
--- a/templates/vserver.d/etc/rc.d/rc.S
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.S
diff --git a/templates/vserver.d/etc/rc.d/rc.httpd b/templates/vserver/vserver.d/etc/rc.d/rc.httpd
index 00b8837..00b8837 100644
--- a/templates/vserver.d/etc/rc.d/rc.httpd
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.httpd
diff --git a/templates/vserver.d/etc/rc.d/rc.inet2 b/templates/vserver/vserver.d/etc/rc.d/rc.inet2
index db56589..db56589 100755
--- a/templates/vserver.d/etc/rc.d/rc.inet2
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.inet2
diff --git a/templates/vserver.d/etc/rc.d/rc.inetd b/templates/vserver/vserver.d/etc/rc.d/rc.inetd
index 9fe1419..9fe1419 100644
--- a/templates/vserver.d/etc/rc.d/rc.inetd
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.inetd
diff --git a/templates/vserver.d/etc/rc.d/rc.ip_forward b/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward
index 52bd2fe..52bd2fe 100644
--- a/templates/vserver.d/etc/rc.d/rc.ip_forward
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.ip_forward
diff --git a/templates/vserver.d/etc/rc.d/rc.local b/templates/vserver/vserver.d/etc/rc.d/rc.local
index 3cf2076..3cf2076 100755
--- a/templates/vserver.d/etc/rc.d/rc.local
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.local
diff --git a/templates/vserver.d/etc/rc.d/rc.mysqld b/templates/vserver/vserver.d/etc/rc.d/rc.mysqld
index 239e2e6..239e2e6 100644
--- a/templates/vserver.d/etc/rc.d/rc.mysqld
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.mysqld
diff --git a/templates/vserver.d/etc/rc.d/rc.postfix b/templates/vserver/vserver.d/etc/rc.d/rc.postfix
index bc32367..bc32367 100644
--- a/templates/vserver.d/etc/rc.d/rc.postfix
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.postfix
diff --git a/templates/vserver.d/etc/rc.d/rc.sendmail b/templates/vserver/vserver.d/etc/rc.d/rc.sendmail
index 1a31c52..1a31c52 100644
--- a/templates/vserver.d/etc/rc.d/rc.sendmail
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.sendmail
diff --git a/templates/vserver.d/etc/rc.d/rc.serial b/templates/vserver/vserver.d/etc/rc.d/rc.serial
index 5f31c01..5f31c01 100755
--- a/templates/vserver.d/etc/rc.d/rc.serial
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.serial
diff --git a/templates/vserver.d/etc/rc.d/rc.sshd b/templates/vserver/vserver.d/etc/rc.d/rc.sshd
index a3707e3..a3707e3 100755
--- a/templates/vserver.d/etc/rc.d/rc.sshd
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.sshd
diff --git a/templates/vserver.d/etc/rc.d/rc.syslog b/templates/vserver/vserver.d/etc/rc.d/rc.syslog
index a005fb7..a005fb7 100755
--- a/templates/vserver.d/etc/rc.d/rc.syslog
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.syslog
diff --git a/templates/vserver.d/etc/rc.d/rc.sysvinit b/templates/vserver/vserver.d/etc/rc.d/rc.sysvinit
index 916e59e..916e59e 100755
--- a/templates/vserver.d/etc/rc.d/rc.sysvinit
+++ b/templates/vserver/vserver.d/etc/rc.d/rc.sysvinit
diff --git a/templates/vserver.d/etc/rssh.conf b/templates/vserver/vserver.d/etc/rssh.conf
index a74acc6..a74acc6 100644
--- a/templates/vserver.d/etc/rssh.conf
+++ b/templates/vserver/vserver.d/etc/rssh.conf
diff --git a/templates/vserver.d/etc/ssh/sshd_config b/templates/vserver/vserver.d/etc/ssh/sshd_config
index a161fec..a161fec 100644
--- a/templates/vserver.d/etc/ssh/sshd_config
+++ b/templates/vserver/vserver.d/etc/ssh/sshd_config
diff --git a/templates/vserver.d/var/www/htdocs/missing.html b/templates/vserver/vserver.d/var/www/htdocs/missing.html
index b2eec17..b2eec17 100644
--- a/templates/vserver.d/var/www/htdocs/missing.html
+++ b/templates/vserver/vserver.d/var/www/htdocs/missing.html
diff --git a/templates/vserver.d/var/www/missing.html b/templates/vserver/vserver.d/var/www/missing.html
index b2eec17..b2eec17 100644
--- a/templates/vserver.d/var/www/missing.html
+++ b/templates/vserver/vserver.d/var/www/missing.html
diff --git a/templates/vserver.s/GPG-KEY b/templates/vserver/vserver.s/GPG-KEY
index fd23e95..fd23e95 100644
--- a/templates/vserver.s/GPG-KEY
+++ b/templates/vserver/vserver.s/GPG-KEY
diff --git a/templates/vserver.s/devices.tar.gz b/templates/vserver/vserver.s/devices.tar.gz
index dc4aea6..dc4aea6 100644
--- a/templates/vserver.s/devices.tar.gz
+++ b/templates/vserver/vserver.s/devices.tar.gz
Binary files differ
diff --git a/templates/vserver.s/vserver.sh b/templates/vserver/vserver.s/vserver.sh
index b381092..b381092 100644
--- a/templates/vserver.s/vserver.sh
+++ b/templates/vserver/vserver.s/vserver.sh
diff --git a/templates/vserver.template b/templates/vserver/vserver.template
index 0cd1f69..0cd1f69 100644
--- a/templates/vserver.template
+++ b/templates/vserver/vserver.template