Hello again.

I have applied your patch and now I have some questions.

It applied nicely and I'm cleaning things up now. I have some problems
to build now, but that have more with the fact that I use LVM than something
else.

...
> @@ -364,33 +341,19 @@
>    exit 1
>  fi
>  
> -# check for /vserver/$VHOST/etc/ incase we are on pre-mounted LVM partition
> -# (used to just check for "/vserver/$VHOST/" existing
> -if [ -d "$VROOTDIR/$VHOST/etc/" -o -f "/etc/vservers/$VHOST.conf" ] ; then
> -  cat << EOF 1>&2
> -${0##*/} error: Virtual Server "$VHOST" appears to already exist
> -  check "/etc/vservers/$VHOST.conf" or "/vservers/$VHOST/etc/";
> -EOF
> -  exit 1
> -fi

Ok. The problem is that vserver ... build do more restrictive checks:
zircone:/etc/vservers# newvserver --hostname test --domain 
intranet.opal.dhs.org --ip 192.168.254.200
s_context: 0
vserver-topdirectory '/srv/vservers/test' and/or configuration at 
'/etc/vservers/test'
exist already; please try to use '--force', or remove them manually
newvserver: error: vserver-build failure. Cannot continue.

I use LVM to create install partitions. I have to fix that.

> -# This is used to keep a cache of the downloaded .deb packges for next 
> install
> -if [ -d "$VROOTDIR/ARCHIVES/$DIST" ]; then
> -    mkdir -p "$VROOTDIR/$VHOST/var/cache/apt/archives"
> -    cp -a "$VROOTDIR/ARCHIVES/$DIST/"*.deb 
> "$VROOTDIR/$VHOST/var/cache/apt/archives" > /dev/null 2>&1
> -fi

Why did you remove this?

>  # We only want to pass the Architecture if we need to (autodectected 
> otherwise)
>  if [ -n "$ARCH" ]; then
>      ARCH_ARGUMENT="--arch $ARCH"
>  fi
>  
> -# Fire off `debootstrap' to do all the hard work
> -# like downloading and installing
> -if ! /usr/sbin/debootstrap $ARCH_ARGUMENT \
> -     "--include=$INSTALL_PACKAGES" "--exclude=$REMOVE_PACKAGES" \
> -     "$DIST" "$VROOTDIR/$VHOST" "$MIRROR" ; then
> -    echo "${0##*/}: error: debootstrap failure. Cannot continue."
> +## use "vserver ... build" to build the new vserver
> +if ! /usr/sbin/vserver "$VHOST" build -m debootstrap \
> +       --rootdir "$VROOTDIR" --hostname "$VHOST" --interface 
> "$INTERFACE:$IP" \
> +       -- -d "$DIST" -m "$MIRROR" \
> +       -- $ARCH_ARGUMENT \
> +        --include="$INSTALL_PACKAGES" --exclude="$REMOVE_PACKAGES"
> +  then
> +    echo "${0##*/}: error: vserver-build failure. Cannot continue."
>      exit 1
>  fi

Ok.

...

> -S_CAPS="CAP_NET_RAW"

Do you know if this is still the default? I need to know if I should close
yet one more bug with this upload. :)

...
>  
>  EOF
>  
> +## start vserver before we can exec anything inside it
> +vserver $VHOST start

Do we need to start it? Is this something new?

>  # Run the above commands from within the server
>  chmod 755 $VROOTDIR/$VHOST/vserver-config.sh
>  vserver $VHOST exec /vserver-config.sh
...
> -# Populate the archive for future virtual servers
> -if [ ! -d $VROOTDIR/ARCHIVES/$DIST ]; then
> -    mkdir -p $VROOTDIR/ARCHIVES/$DIST
> -fi
> -cp $VROOTDIR/$VHOST/var/cache/apt/archives/*.deb $VROOTDIR/ARCHIVES/$DIST

This is removed because you remove the above...

...

Regards,

// Ola

-- 
 --------------------- Ola Lundqvist ---------------------------
/  [EMAIL PROTECTED]                     Annebergsslingan 37      \
|  [EMAIL PROTECTED]                 654 65 KARLSTAD          |
|  +46 (0)54-10 14 30                  +46 (0)70-332 1551       |
|  http://www.opal.dhs.org             UIN/icq: 4912500         |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to