slitaz-dev-tools rev 25

Few improvements to default tazchroot.conf (which allo to create sandbox)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Mar 04 04:25:39 2011 +0100 (2011-03-04)
parents da3f5c898394
children 557aa406a8de
files tazchroot/tazchroot.conf
line diff
     1.1 --- a/tazchroot/tazchroot.conf	Sun Feb 27 12:19:23 2011 +0100
     1.2 +++ b/tazchroot/tazchroot.conf	Fri Mar 04 04:25:39 2011 +0100
     1.3 @@ -5,23 +5,25 @@
     1.4  # Use SliTaz version:
     1.5  SLITAZ_VERSION=cooking
     1.6  
     1.7 -# Chroot path:
     1.8 -chroot_dir=/home/cooking
     1.9 -
    1.10  # SLITAZ_DIR (it's mounted on chroot)
    1.11  SLITAZ_DIR=/home/slitaz
    1.12  
    1.13 +# Chroot path:
    1.14 +chroot_dir=$SLITAZ_DIR/$SLITAZ_VERSION/sandbox
    1.15 +
    1.16  # Online repository path:
    1.17 -MIRROR=http://mirror.slitaz.org/packages/experimental/
    1.18 +# Actually Pankso provide a mirror of packages being cooked on tank,
    1.19 +# waiting for having them on http://mirror.slitaz.org/packages/cooking
    1.20 +MIRROR=http://people.slitaz.org/~pankso/packages/
    1.21  
    1.22  # Default SliTaz paths.
    1.23  LOCALSTATE=/var/lib/tazpkg
    1.24  INSTALLED=$LOCALSTATE/installed
    1.25  
    1.26  # Webserver path;
    1.27 -# Define where the chrooted webserver should be linker into
    1.28 -# the host system; In this case use the default path when
    1.29 -# setting up chrooted webserver.
    1.30 +# Define where the webserver should be located.
    1.31 +# You have to use the same setup inside & outside the chroot.
    1.32 +# Here we use the default setup.
    1.33  # The host system needs php installed to make it works.
    1.34  # Uncomment to following line to use this option.
    1.35  #WEBSERVER="/var/www/vhosts/bb"
    1.36 @@ -33,7 +35,8 @@
    1.37  # List of directories to mount.
    1.38  # They are mounted to an equivalent location into chroot.
    1.39  # (one per line)
    1.40 -list_dir="$SLITAZ_DIR"
    1.41 +list_dir="$SLITAZ_DIR
    1.42 +$WEBSERVER"
    1.43  
    1.44  create_chroot()
    1.45  {
    1.46 @@ -82,20 +85,9 @@
    1.47  	echo "$SLITAZ_VERSION" > "$chroot_dir/etc/slitaz-release"
    1.48  
    1.49  	# Webserver setup.
    1.50 -	if [ "$WEBSERVER" ]; then
    1.51 -		if [ -e "$WEBSERVER" ]; then
    1.52 -			if [ -L "$WEBSERVER" ]; then
    1.53 -				[ "$(readlink $WEBSERVER)" = "$chroot_dir/var/www/vhosts/bb" ] || {
    1.54 -					rm "$WEBSERVER"
    1.55 -					ln -s "$chroot_dir/var/www/vhosts/bb" "$WEBSERVER"
    1.56 -				}
    1.57 -			else
    1.58 -				echo  "\\033[1;31mWarning:\\033[0m Something at $WEBSERVER prevent to setup the webserver link correctly."
    1.59 -			fi
    1.60 -		else
    1.61 -			ln -s "$chroot_dir/var/www/vhosts/bb" "$WEBSERVER"
    1.62 -		fi
    1.63 -	fi
    1.64 +	mkdir -p /usr/lib/slitaz
    1.65 +	[ -d /usr/lib/slitaz/web-bb ] ||
    1.66 +	ln -s $chroot_dir/usr/lib/slitaz/web-bb /usr/lib/slitaz/web-bb
    1.67  
    1.68  	# Mount system directories
    1.69  	mount -t proc proc $chroot_dir/proc