From a08e3948543f888c02971e8916fcb56e3bec8160 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 9 Feb 2007 23:03:37 +0000 Subject: vservers post-install scripts fixed git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@178 04377dda-e619-0410-9926-eae83683ac58 --- templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'templates/vserver-legacy/vserver-legacy.s') diff --git a/templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh b/templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh index f243ea0..4ce8a4b 100644 --- a/templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh +++ b/templates/vserver-legacy/vserver-legacy.s/vserver-legacy.sh @@ -3,9 +3,10 @@ # legacy vserver template # -DEVICES="/etc/simplepkg/vserver-legacy.s/devices.tar.gz" -GPGKEY="/etc/simplepkg/vserver-legacy.s/GPG-KEY" -SKEL="/etc/simplepkg/vserver-legacy.s/skel.conf" +BASE="/etc/simplepkg/templates/vserver-legacy/vserver-legacy.s/" +DEVICES="$BASE/devices.tar.gz" +GPGKEY="$BASE/GPG-KEY" +SKEL="$BASE/skel.conf" if [ -z "$2" ]; then echo "usage: `basename $0` " @@ -30,7 +31,8 @@ else fi if [ -f "$SKEL" ]; then - echo "creating /etc/vservers/$2.conf" + echo "creating /etc/vservers/$2.conf" + mkdir -p /etc/vservers cp $SKEL /etc/vservers/$2.conf else echo error: config file template $SKEL not found @@ -42,7 +44,6 @@ if [ -f "$GPGKEY" ]; then gpg --homedir $1/$2/root/.gnupg --import $GPGKEY fi -# todo: add rebootmgr echo "done; now edit /etc/vservers/$2.conf" echo "then, set all desired iptables rules and start $server vserver" echo "dont forget to change root's password with the command "vserver $2 exec passwd"" -- cgit v1.2.3