# HG changeset patch # User Christopher Rogers # Date 1298594093 0 # Node ID b5a5fbb611812e11d49d49fa0b9fef9adcd0ab3f # Parent bf6db9997f479dce1f218789a126d0488eb7ec0f Updated mirror-tools to use slitaz-dev-tools. diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/receipt --- a/mirror-tools/receipt Fri Feb 25 00:13:56 2011 +0000 +++ b/mirror-tools/receipt Fri Feb 25 00:34:53 2011 +0000 @@ -7,10 +7,18 @@ MAINTAINER="pascal.bellard@slitaz.org" WEB_SITE="http://www.slitaz.org/" DEPENDS="rrdtool rgzip" +BUILD_DEPENDS="mercurial" +SOURCE="slitaz-dev-tools" +WGET_URL="mercurial|http://hg.slitaz.org/slitaz-dev-tools" +BRANCH="$VERSION" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - cp -a $stuff/* $fs + cp -a $src/$PACKAGE/rootfs/* $fs + mkdir -p $fs/var/www + cp -a $src/$PACKAGE/mirror-info $fs/var/www + cp -a $src/$PACKAGE/slitaz $fs/var/www + chown -R 80.80 $fs/var/www } diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/etc/lighttpd/vhosts.conf --- a/mirror-tools/stuff/etc/lighttpd/vhosts.conf Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -# /etc/lighttpd/vhosts.conf : Virtual hosts configuration file. -# - -# Example.org -# -#$HTTP["host"] =~ "(^|\.)example\.org$" { - #server.document-root = "/var/www/vhost/exemple.com/html" - #server.errorlog = "/var/log/lighttpd/example.org-error.log" - #accesslog.filename = "/var/log/lighttpd/example.org-access.log" -#} - -# mirror.slitaz.org (Server canonical hostname) -# -$HTTP["host"] =~ "^mirror([0-9]*)\.slitaz\.org$" { - server.document-root = "/var/www/slitaz/mirror" - server.errorlog = "/var/log/lighttpd/mirror.slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/mirror.slitaz.org-access.log" - - include "awstats.conf" - - alias.url += ( "/info" => "/var/www/mirror-info/" ) - - alias.url += ( "/pizza" => "/var/www/pizza/" ) - - alias.url += ( "/doc" => "/var/www/doc/" ) - var.dokudir = "/doc" - # Rewrites for dokuwiki - url.rewrite = ( - "^" + var.dokudir + "/lib/.*$" => "$0", - "^" + var.dokudir + "/_media/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1&$2", - "^" + var.dokudir + "/_media/(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1", - "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2", - "^" + var.dokudir + "/_detail/(.*)?$" => var.dokudir + "/lib/exe/detail.php?media=$1", - "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3", - "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2", - "^" + var.dokudir + "/doku.php.*" => "$0", - "^" + var.dokudir + "/feed.php.*" => "$0", - "^" + var.dokudir + "/(.*)\?(.*)" => var.dokudir + "/doku.php?id=$1&$2", - "^" + var.dokudir + "/(.*)" => var.dokudir + "/doku.php?id=$1" - ) - - alias.url += ( "/webboot" => "/var/www/boot/" ) - - alias.url += ( "/pkgs" => "/var/www/pkgs/" ) - index-file.names += ( "search.sh" ) - cgi.assign += ( - ".sh" => "/bin/sh" - ) - - alias.url += ( "/hg" => "/var/www/hg/" ) -### url.rewrite-once = ( "/hg(.*)" => "/hg/hgwebdir.py$1" ) - index-file.names += ( "hgwebdir.py" ) - cgi.assign += ( - ".py" => "/usr/bin/python" - ) - - alias.url += ( "/www" => "/home/slitaz/website" ) - -# alias.url += ( "/tiny" => "/var/www/pizza/tiny/demos/192.168.0.6/var/www" ) -# index-file.names += ( "index.sh" ) - - index-file.names += ( "index.html" ) - index-file.names += ( "index.php" ) - # Last but not least... - index-file.names += ( "/dir-generator.php" ) -} - -## info.mirror.slitaz.org -## -#$HTTP["host"] =~ "^info\.mirror\.slitaz\.org$" { -# server.document-root = "/var/www/mirror-info/" -# server.errorlog = "/var/log/lighttpd/info.mirror.slitaz.org-error.log" -# accesslog.filename = "/var/log/lighttpd/info.mirror.slitaz.org-access.log" -# include "awstats.conf" -#} - -$HTTP["host"] =~ "ajaxterm\.slitaz\.org$" { - proxy.server = ( "/" => - ( ( "host" => "127.0.0.1", "port" => 8022 ) ) - ) -} - -# pizza.slitaz.org (Server canonical hostname) -# -$HTTP["host"] =~ "^pizza\.slitaz\.org$" { - server.document-root = "/var/www/pizza" - server.errorlog = "/var/log/lighttpd/pizza.slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/pizza.slitaz.org-access.log" - include "awstats.conf" - index-file.names += ( "index.php" ) -} - -# slitaz.org -# -#$HTTP["host"] =~ "(^|www\.)slitaz\.org$" { -$HTTP["host"] =~ "www\.slitaz\.org$" { - server.document-root = "/home/slitaz/website" - server.errorlog = "/var/log/lighttpd/slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/slitaz.org-access.log" - include "awstats.conf" - -### index-file.names = ( "index.html" ) - index-file.names += ( "start.html" ) - - -### url.rewrite-once = ( -### "^/about" => "/fr/about", -### "^/artwork" => "/fr/artwork", -### "^/devel" => "/fr/devel", -### "^/doc" => "/fr/doc", -### "^/get" => "/fr/get", -### "^/packages" => "/fr/packages" -### ) - -} - -# doc.slitaz.org -# -$HTTP["host"] =~ "doc\.slitaz\.org$" { - server.document-root = "/var/www/doc" - server.errorlog = "/var/log/lighttpd/doc.slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/doc.slitaz.org-access.log" - index-file.names = ("doku.php") - var.dokudir = "" - # Rewrites for dokuwiki - url.rewrite = ( - "^" + var.dokudir + "/lib/.*$" => "$0", - "^" + var.dokudir + "/_media/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1&$2", - "^" + var.dokudir + "/_media/(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1", - "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2", - "^" + var.dokudir + "/_detail/(.*)?$" => var.dokudir + "/lib/exe/detail.php?media=$1", - "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3", - "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2", - "^" + var.dokudir + "/doku.php.*" => "$0", - "^" + var.dokudir + "/feed.php.*" => "$0", - "^" + var.dokudir + "/(.*)\?(.*)" => var.dokudir + "/doku.php?id=$1&$2", - "^" + var.dokudir + "/(.*)" => var.dokudir + "/doku.php?id=$1" - ) -} - -# boot.slitaz.org -# -$HTTP["host"] =~ "boot\.slitaz\.org$" { - server.document-root = "/var/www/boot" - server.errorlog = "/var/log/lighttpd/boot.slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/boot.slitaz.org-access.log" -} - -# pkgs.slitaz.org -# -$HTTP["host"] =~ "pkgs\.slitaz\.org$" { - server.document-root = "/var/www/pkgs" - server.errorlog = "/var/log/lighttpd/pkgs.slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/pkgs.slitaz.org-access.log" - index-file.names += ( "search.sh" ) - cgi.assign = ( - ".sh" => "/bin/sh" - ) -} - -# hg.slitaz.org (Mercurial repos) -# -$HTTP["host"] =~ "hg\.slitaz\.org" { - cgi.assign = ( - ".py" => "/usr/bin/python" - ) - server.document-root = "/var/www/hg" -# url.rewrite-once = ( "(.*)" => "/hgwebdir.py$1" ) - index-file.names += ( "hgwebdir.py" ) -} - -# scn.slitaz.org (SliTaz Community Network) -# -$HTTP["host"] =~ "scn\.slitaz\.org$" { - server.document-root = "/var/www/scn" - server.errorlog = "/var/log/lighttpd/scn.slitaz.org-error.log" - accesslog.filename = "/var/log/lighttpd/scn.slitaz.org-access.log" - url.rewrite-final = ( - "^/system/test/(.*)$" => "/index.php?q=system/test/$1", - "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2", - "^/([^.?]*)$" => "/index.php?q=$1", - "^/rss.xml" => "/index.php?q=rss.xml" - ) -} diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/etc/rsyncd.conf --- a/mirror-tools/stuff/etc/rsyncd.conf Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -# rsynd configuration for SliTaz mirror -# -motd file=/etc/rsyncd.motd -log file=/var/log/rsyncd -pid file=/var/run/rsyncd.pid - - -[slitaz] - - comment = SliTaz GNU/Linux mirror - path = /var/www/slitaz/mirror - use chroot = yes - max connections = 5 - lock file = /var/lock/rsyncd - read only = yes - list = yes - uid = nobody - gid = nogroup - strict modes = yes - ignore errors = no - ignore nonreadable = yes - transfer logging = no - timeout = 600 - refuse options = checksum dry-run - dont compress = *.gz *.tgz *.zip *.iso *.bz2 *.tazpkg diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/etc/rsyncd.motd --- a/mirror-tools/stuff/etc/rsyncd.motd Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -=============================================================================== - - SliTaz GNU/Linux mirror - http://www.slitaz.org/ - -=============================================================================== - -modules: - - * slitaz --> ISO, packages, boot... all stuff - -=============================================================================== - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/etc/tazwok.conf.mirror --- a/mirror-tools/stuff/etc/tazwok.conf.mirror Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -# tazwok.conf: Tazwok configuration file. -# - -# Wok directory/tree to find receipts and build packages. -# By default on SliTaz the directory is /home/slitaz/wok. -WOK="/slitaz/home/slitaz/wok" - -# The path to the sources tarballs of the binaries packages. -SOURCES_REPOSITORY="/slitaz/home/slitaz/src" - -# This path set the binaries packages repository. It's where all -# the gen *.tazpkg will be stored when using gen-repository command. -PACKAGES_REPOSITORY="/var/www/slitaz/mirror/packages/cooking" - -# Default build host -BUILD_HOST=i486-pc-linux-gnu - -# Default tool prefix -TOOLPREFIX="${BUILD_HOST}-" - -# Default arguments for GNU configure. -CONFIGURE_ARGS="--build=$BUILD_HOST --host=$BUILD_HOST" - -# Translation files to include in packages, note that you can specifiy -# several locale. -LOCALE="fr" - -# Mirrors URLs. To downloads source next from your location. -# GNU mirror : -# -GNU_MIRROR="http://ftpmirror.gnu.org" - -# SourceForge mirror : -# -SF_MIRROR="http://prdownloads.sourceforge.net/sourceforge" - -# Xorg mirror : -# -XORG_MIRROR="ftp://ftp.solnet.ch/mirror/x.org/pub/individual" - -# FSH standards directories with init. Package generation will abort if -# a file is installed in a non-specified path. Note /vz is for OpenVZ. -FSH="bin boot dev etc home init lib media mnt proc root sbin share sys \ -tmp usr var vz usr/bin usr/games usr/include usr/lib usr/local usr/sbin \ -usr/share usr/src" diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/home/backups/mirror/backup.sh --- a/mirror-tools/stuff/home/backups/mirror/backup.sh Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -#!/bin/sh - -KEEP=1 -EXTRA="monthly:30:2" -BACKUP_USER=bellard -REMOTE_USER=bellard - -backup_data() -{ -GZIP=rgzip -which $GZIP > /dev/null || GZIP=gzip -echo "Sync doc.slitaz.org ..." -rsync -aH -e "$SSH" --bwlimit=50 \ - $REMOTE_USER@tank.slitaz.org:/home/slitaz/www/doc/data/. /var/www/doc/data/. -while read file dirs; do - echo "Create $file.cpio.gz ..." - ( cd / ; find $dirs | cpio -o -H newc ) | \ - $GZIP -9 > $file.cpio.gz 2> /dev/null -done < -# Pascal Bellard - -VERSION=0.9 - -PKG_VER=$1 -ROOT=/home/slitaz/iso -REPOS=/var/www/slitaz/mirror/packages/$PKG_VER -SOURCES=/var/www/slitaz/mirror/sources/packages -IFMEM_C32=/var/www/slitaz/mirror/pxe/ifmem.c32 -ISO_DIR=/var/www/slitaz/mirror/iso/$PKG_VER - -[ -s /etc/slitaz/mkpkgiso.conf ] && . /etc/slitaz/mkpkgiso.conf -[ -s ./mkpkgiso.conf ] && . ./mkpkgiso.conf - -SORT_DIR=${ROOT}/_iso.$$ -TEMP_DIR=${ROOT}/_iso.$$ -SORT_FILE=${ROOT}/_sort.$$ -shift -OPTIONS=$@ -PKG_DIR=$TEMP_DIR/packages/$PKG_VER -SRC_DIR=$TEMP_DIR/src -LOG=$PWD/$(basename $0).log - -# -VOLUME_ID="packages-${PKG_VER}" -PUBLISHER="SliTaz http://www.slitaz.org/" -IMAGE="packages-${PKG_VER}.iso" -case " $@ " in -*\ --sources\ *) - IMAGE="sources-${PKG_VER}.iso" ;; -esac -OUTPUT="$ROOT/$IMAGE" - -# Check command line option. -if [ -z $PKG_VER ]; then - cat < - [--boot [--auto-install] [--loram-detect]]|--webboot] [--filter] - [--wok] [--wok-stable] [--website] [--sources] [--dry-run] - $(basename $0) update-hg -Example: -$(basename $0) cooking --boot --auto-install --loram-detect --filter --wok --website --sources -EOT - exit 1 -fi - -# Update hg repos -if [ "$PKG_VER" == "update-hg" ]; then - for i in $1/* ; do - grep -qs '\[paths]' $i/.hg/hgrc || continue - cd $i - hg pull - hg update - cd - > /dev/null - done - exit 1 -fi - -# Check if we provide a valide version -if [ ! -d $REPOS ]; then - echo "Boooh! $PKG_VER is not a valid version." - exit 1 -fi - -# Status function. -status() -{ - local CHECK=$? - echo -en "\\033[70G[ " - if [ $CHECK = 0 ]; then - echo -en "\\033[1;33mOK" - else - echo -en "\\033[1;31mFailed" - fi - echo -e "\\033[0;39m ]" -} - -need() -{ - found=1 - for i in $@ ; do - [ -s $i ] && continue - echo "Missing: $i " - found=0 - done - [ $found -ne 0 ] && return - status - rm -rf $TEMP_DIR $SORT_FILE - exit 1 -} - -# Create temp directory -mkdir -p $TEMP_DIR/packages/$PKG_VER -which genisoimage > /dev/null || need /usr/bin/genisoimage - -# Prepare evrything for ISO - -echo "" -echo "Building ISO for packages $PKG_VER" -echo "===============================================================================" -echo -n "Creating working dir $(basename $TEMP_DIR)" -status -echo -n "Creating symlink" -status - -# Link every packages to temp dir -cd $PKG_DIR -for i in $REPOS/* -do - ln -s $i >> $LOG 2>&1 -done - -echo -n "Creating install script" -# Create install script as suggested by Pascal. -cat >$TEMP_DIR/install.sh< /dev/null - mount --bind /mnt /cdrom - fi - # Handle loram on hybrid hard disk / usb key case - if [ ! -d /usr/bin ]; then - echo "" - if [ -d /.usr.rw ]; then - echo -n "Mounting /usr read-write... " - usr=.usr.ro - else - echo -n "Mounting /usr read-only... " - usr=usr - fi - FS=\$DIR/usr.cromfs - if [ -f \$FS ]; then - /bin/cromfs-driver \$FS /\$usr -o ro,dev,suid,allow_other - elif [ -f \$DIR/usr.sqfs ]; then - FS=\$DIR/usr.sqfs - mount -o loop,ro -t squashfs \$FS /\$usr - elif [ -L /\$usr ]; then - FS=\$DIR/usr - fi - status - if [ -d /.usr.rw ]; then - if [ -x /bin/funionfs ]; then - /bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other -o suid,dev NONE /usr - else - /bin/mount -t aufs -o br:/.usr.rw:/.usr.ro none /usr - fi - fi - fi -fi - -[ -d /var/cache/tazpkg ] || mkdir -p /var/cache/tazpkg -ls -d \$DIR/packages/* > /var/lib/tazpkg/mirror -ln -fs \$DIR/packages/*/*.tazpkg /var/cache/tazpkg/ -ln -fs \$DIR/packages/*/packages.* /var/lib/tazpkg -echo "" -echo "=> all $PKG_VER packages are available for tazpkg/tazpkgbox" -EOF -[ -e files.list.lzma ] && cat >>$TEMP_DIR/install.sh< $SORT_FILE <> $SORT_FILE -chmod 755 $TEMP_DIR/install.sh - -case " $OPTIONS " in -*\ --filter\ *) - SIZE=0 - for i in *.tazpkg; do - while read f; do - case "$i" in - $f*) continue 2;; - esac - done < packages.list - echo -n "Filter out $i ($(du -hs $(readlink $i) | awk '{ print $1 }'))..." - SIZE=$(( $SIZE + $(stat -c %s $(readlink $i)) )) - rm $i - status - done - UNIT=" bytes" - if [ $SIZE -gt 10240 ]; then - SIZE=$(( $SIZE / 1024 )) - UNIT="K" - fi - if [ $SIZE -gt 10240 ]; then - SIZE=$(( $SIZE / 1024 )) - UNIT="M" - fi - echo "$SIZE$UNIT removed.";; -esac - -# Copy hg subtree -get_from_hg() -{ -echo -n "Adding $2" -if [ -s /home/slitaz/$1/.hg/hgrc ]; then - cp -a /home/slitaz/$1 $TEMP_DIR -else - wget -q -O - http://hg.slitaz.org/$1/archive/tip.tar.bz2 | tar xjf - -C $TEMP_DIR - mv $TEMP_DIR/$1-* $TEMP_DIR/$1 -fi -status -echo "$(du -hs $TEMP_DIR/$1 | awk '{ print $1 }') used by $2." -} - -for i in $OPTIONS ; do -case "$i" in ---wok) - cat >>$TEMP_DIR/install.sh< Wok (cooking) is in /home/slitaz/wok" -EOF - if get_from_hg wok "wok (cooking)"; then - echo "$SORT_DIR/wok -8000" >> $SORT_FILE - fi;; ---wok-stable) - cat >>$TEMP_DIR/install.sh< Wok (stable) is in /home/slitaz/wok" -EOF - if get_from_hg wok-stable "wok (stable)"; then - mv $TEMP_DIR/wok-stable $TEMP_DIR/wok - echo "$SORT_DIR/wok -8000" >> $SORT_FILE - fi;; ---website) - if get_from_hg website "web site"; then - echo "$SORT_DIR/website -6000" >> $SORT_FILE - cat >>$TEMP_DIR/install.sh< slitaz web site installed in file://\$DIR/website/index.html" -EOF - fi;; ---sources) - echo -n "Removing previous ISO..." - rm -f $OUTPUT - status - cat >>$TEMP_DIR/install.sh< sources are in /home/slitaz/src" -EOF - mkdir -p $SRC_DIR - cd $SRC_DIR - for i in $SOURCES/*/* - do - case "$i" in - */md5sum) continue;; - esac - ln -s $i >> $LOG 2>&1 - done - find * -not -type d | grep -v md5sum | xargs md5sum > md5sum - echo "$(du -hs $SOURCES | awk '{ print $1 }') used by sources." ;; -esac -done - -# Extract boot package function -extract_boot() -{ -f=$(ls $REPOS/$1-[0-9]*.tazpkg 2> /dev/null) -[ -f "$f" ] || return 1 -[ -d $TEMP_DIR/boot ] || mkdir $TEMP_DIR/boot -( cd $TEMP_DIR/boot ; cpio -i fs.cpio.gz < $f 2> /dev/null ) -( cd $TEMP_DIR/boot ; zcat fs.cpio.gz | cpio -id 2> /dev/null ) -mv $TEMP_DIR/boot/fs/boot/* $TEMP_DIR/boot -rm -rf $TEMP_DIR/boot/fs.cpio.gz $TEMP_DIR/boot/fs -return 0 -} - -# Gen boot part -BOOT_OPT="" -iso=$ISO_DIR/slitaz-$PKG_VER.iso -for i in slitaz-loram-cdrom-sqfs slitaz-$PKG_VER-loram-cdrom ; do - isoloram=$ISO_DIR/flavors/$i.iso - [ -s $isoloram ] && break -done -case " $OPTIONS " in -*\ --boot\ *) - echo -n "Creating boot tree" - need $iso - which isoinfo > /dev/null || need /usr/bin/isoinfo - isoinfo -R -l -i $iso | awk '/^Directory/ { path=$4 } /^-/ { print path$12 }' | while read file; do - [ "$(basename $file)" == ".." ] && continue - [ "$file" = "/boot/isolinux/boot.cat" ] && continue - [ -d "$(dirname $TEMP_DIR/$file)" ] || - mkdir -p "$(dirname $TEMP_DIR/$file)" - isoinfo -R -x "$file" -i $iso > "$TEMP_DIR/$file" - done - if [ -f "$(echo $TEMP_DIR/boot/vmlinuz*)" ]; then - rm -f $TEMP_DIR/boot/bzImage - ln $TEMP_DIR/boot/vmlinuz* $TEMP_DIR/boot/bzImage - fi - status - BOOT_OPT="-sort $SORT_FILE -b boot/isolinux/isolinux.bin \ --c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table" - case " $OPTIONS " in - *\ --auto-install\ *) - echo -n "Enable auto install" - sed -i "s/rw root/rw config=LABEL=packages-$PKG_VER,install.sh root/" \ - $TEMP_DIR/boot/isolinux/*.cfg - status - ;; - esac - case " $OPTIONS " in - *\ --loram-detect\ *) - echo -n "Enable loram autodetection" - need $IFMEM_C32 $isoloram - which isoinfo > /dev/null || need /usr/bin/isoinfo - cp $IFMEM_C32 "$TEMP_DIR/boot/isolinux" - isoinfo -R -x "/usr.sqfs" -i $isoloram \ - > "$TEMP_DIR/usr.sqfs" 2> /dev/null - if [ -s "$TEMP_DIR/usr.sqfs" ]; then - echo "$SORT_DIR/usr.sqfs -5000" >> $SORT_FILE - else - rm -f "$TEMP_DIR/usr.sqfs" - isoinfo -R -x "/rootfs.gz" -i $isoloram \ - > "$TEMP_DIR/rootfs.gz" 2> /dev/null - echo "$SORT_DIR/rootfs.gz -5000" >> $SORT_FILE - fi - isoinfo -R -x "/boot/rootfs.gz" -i $isoloram > \ - "$TEMP_DIR/boot/loram.gz" - cat >> $TEMP_DIR/boot/isolinux/common.cfg <> $TEMP_DIR/boot/isolinux/noram.cfg <> $SORT_FILE - ;; -*\ --webboot\ *) - if extract_boot gpxe; then - echo -n "Creating web boot tree" - which isoinfo > /dev/null || need /usr/bin/isoinfo - mkdir $TEMP_DIR/boot/isolinux/ - isoinfo -R -x "/boot/isolinux/isolinux.bin" -i $iso > \ - $TEMP_DIR/boot/isolinux/isolinux.bin - mv $TEMP_DIR/boot/gpxe $TEMP_DIR/boot/isolinux - echo "$SORT_DIR/boot 0" >> $SORT_FILE - cat > $TEMP_DIR/boot/isolinux/isolinux.cfg < /dev/null | \ - awk 'END { print $1 }') used by boot." -fi - -case " $OPTIONS " in -*\ --dry-run\ *) - echo "Please check and remove $TEMP_DIR and $SORT_FILE" - exit - ;; -esac -# Gen ISO -echo -n "Generating iso image" -genisoimage -R -J -f -V $VOLUME_ID \ - -P "$PUBLISHER" -md5-list $REPOS/packages.md5 \ - -quiet -o $OUTPUT $BOOT_OPT $TEMP_DIR -status - -echo "$(du -hs $OUTPUT | awk '{ print $1 }') used by iso image." - -cd ${ROOT} -echo -n "Create hybrid DVD/CDROM" -which isohybrid > /dev/null && isohybrid $IMAGE 2> /dev/null -status - -echo -n "Calculate md5sum" -md5sum $IMAGE > $(basename $IMAGE .iso).md5 -status - -echo -n "Moving file to mirror" -mv $IMAGE $ISO_DIR -mv $(basename $IMAGE .iso).md5 $ISO_DIR -status - -# Cleaning temp files -rm -rf $TEMP_DIR $SORT_FILE - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/boot/lguest-disk --- a/mirror-tools/stuff/usr/share/mirror-host/boot/lguest-disk Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -#!/bin/sh - -usage() -{ - cat << EOT -resize2fs -usage: -$0 grow [MG] -$0 fixmbr -EOT - exit 1 -} - -grow() -{ - case "$2" in - *M) dd if=/dev/zero bs=1M count=${2%M} >> /boot/guests/$1 ;; - *G) dd if=/dev/zero bs=1G count=${2%G} >> /boot/guests/$1 ;; - esac -} - -# write a 32 bits data -# usage: storelong offset data32 file -storelong() -{ - echo $2 | awk '{ printf "%c%c%c%c", - $1%256,($1/256)%256,($1/256/256)%256,($1/256/256/256)%256 }' | \ - dd bs=1 conv=notrunc of=$3 seek=$(( $1 )) 2> /dev/null -} - -# read a 32 bits data -# usage: getlong offset file -getlong() -{ - dd if=$2 bs=1 skip=$(( $1 )) count=4 2> /dev/null | \ - hexdump -e '"" 1/4 "%d" "\n"' -} - -fixmbr() -{ - if [ $(getlong 0x1ea $1) -ne 0 -a $(getlong 0x1fa $1) -ne 0 ]; then - echo "Parttion 3 & 4 non empty. Abort" - exit 1 - fi - if [ $(getlong 0x1da $1) -eq 0 ]; then - echo "Parttion 2 empty. Abort" - exit 1 - fi - size=$(stat -c %s $1) - new=$(( $size/512 - 32 - $(getlong 0x1ca $1) )) - storelong 0x1da $new $1 -} - -case "$1" in -grow) shift; grow $@ ; fixmbr $1 ;; -fixmbr) shift; fixmbr $1 ;; -*) usage ;; -esac diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/boot/lguest-slitaz --- a/mirror-tools/stuff/usr/share/mirror-host/boot/lguest-slitaz Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#!/bin/sh - -tty=tty; [ -n "$1" ] && tty=$1 -export TERM=$tty -shift - -rootfs="--initrd=/boot/rootfs-lguest.gz" -[ -n "$1" ] && rootfs="--block=$1 root=/dev/vda2" -shift - -net="--tunnet=192.168.0.1" -case "$1" in -192*) net="--tunnet=$1"; shift;; -esac - -args="screen=text lang=fr_FR kmap=fr-latin1 sound=noconf" -[ -n "$1" ] && args=$@ - -/sbin/modprobe lg -/usr/bin/lguest 512 /boot/vmlinuz-2.6.25.5-lguest \ - $net $rootfs $args > /dev/$tty < /dev/$tty 2>&1 diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/boot/shellinabox.sh --- a/mirror-tools/stuff/usr/share/mirror-host/boot/shellinabox.sh Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -#!/bin/sh - -services="/ /reset /reboot /ssh" - -mkexe() -{ -exe=$0 -while true; do - cd $(dirname $exe) - exe=$(basename $exe) - [ -L $exe ] || break - exe=$(readlink $exe) -done -echo $(pwd)/$exe -} -exe=$(mkexe) - -services_arg() -{ -for i in $services ; do - echo -n "-s '$i:root:root:/tmp:LINES=25 /bin/sh -c \"$exe service $i " - echo -n "\${peer} \${url} \${columns} \${lines}\"' " -done -} - -launch_ssh() -{ - # Get SSH server - server="" - echo -n "SSH server: " - read -t 300 server || exit 1 - [ -n "$server" ] || exit 1 - - # Allow non default SSH port with format server:port - sshport="" - case "$server" in - *:*) sshport="-p ${server#*:}" - server=${server%:*};; - esac - - # heading ! in server name means open remote ssh port with a knock sequence - if [ -x /usr/bin/knock ]; then - case "$server" in - !*) server=${server#*!} - echo -n "Knock sequence (port[:proto]...): " - read -t 30 sequence && knock ${server#*@} $sequence - esac - fi - - # Get SSH user if missing - case "$server" in - *@*) ;; - *) echo -n "$server login: " - read -t 30 user || exit 1 - server="$user@$server";; - esac - - # Launch OpenSSH or Dropbear - sshargs="-oPreferredAuthentications=keyboard-interactive,password -oNoHostAuthenticationForLocalhost=yes -oLogLevel=FATAL -F/dev/null"; - [ -L /usr/bin/ssh ] && sshargs="" - exec ssh $sshport $sshargs $server -} - -auth() -{ - while read host md5 ; do - [ "${host#*.}" == "${1#*.}" ] && break - done < $(dirname $exe)/shellinabox.secrets - echo -n "$host password: " - read -s -t 30 password || exit 1 - [ "$(echo $password | md5sum)" == "$md5 -" ] || exit 1 - echo "" -} - -pidfile=/var/run/shellinaboxd.pid -case "$1" in -service) - host=$(echo $4 | sed 's/.*\/\/\(.*\):.*/\1/') - tty=$(awk "/$host/ { print \$2 }" /etc/inittab) - vm=$(awk "/$host/ { print \$3 }" /etc/inittab) - [ -n "$vm" ] || exit 1 - case "$2" in - /) - auth $host - exec /usr/bin/conspy ${tty#tty} ;; - /reboot) - auth $host - echo -n "Sure to reboot $host now (YES or NO) ?" - read -t 30 answer || exit 1 - case "$answer" in - YES*) ;; - *) exit 1;; - esac - exec /bin/kill $(ps ww | grep $vm | awk '/lguest/ { printf "%s ",$1 }') ;; - /ssh) - auth $host - launch_ssh ;; - esac - ;; -start) - dir=$(dirname $exe) - eval shellinaboxd --background=$pidfile --cert=/boot/cert $(services_arg) - ;; -stop) - [ -s $pidfile ] && kill $(cat $pidfile) - ;; -esac diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/etc/apache/conf.d/slitaz --- a/mirror-tools/stuff/usr/share/mirror-host/etc/apache/conf.d/slitaz Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - ServerName mirror.slitaz.org - ServerAlias *.slitaz.org - - ProxyPreserveHost On - ProxyRequests Off - ProxyTimeout 600 - - Order deny,allow - Allow from all - - ProxyPass / http://192.168.0.6/ - ProxyPassReverse / http://192.168.0.6/ - - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/etc/apache/conf.d/slitaz-ssl --- a/mirror-tools/stuff/usr/share/mirror-host/etc/apache/conf.d/slitaz-ssl Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - SSLProxyEngine On - SSLEngine On - ServerName mirror.slitaz.org:443 - ServerAlias *.slitaz.org - SSLCertificateFile /etc/ssl/apache/slitaz.org.pem - SSLCertificateKeyFile /etc/ssl/apache/slitaz.org.pem - - ProxyPreserveHost On - ProxyRequests Off - ProxyTimeout 600 - - Order deny,allow - Allow from all - - ProxyPass / http://192.168.0.6/ - ProxyPassReverse / http://192.168.0.6/ - - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/etc/init.d/shellinabox --- a/mirror-tools/stuff/usr/share/mirror-host/etc/init.d/shellinabox Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/boot/shellinabox.sh \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/mirror-host/install --- a/mirror-tools/stuff/usr/share/mirror-host/install Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -#!/bin/sh - -grep -qs lguest-slitaz /etc/inittab || { -sed -i 's|^tty1::|tty16::respawn:/boot/lguest-slitaz tty16 /boot/guests/mirror.slitaz.org 192.168.0.1\n&|' /etc/inittab -cat >> /etc/init.d/local.sh < /proc/sys/net/ipv4/ip_forward -EOT -} diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/rrd/makegraphs --- a/mirror-tools/stuff/usr/share/rrd/makegraphs Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +0,0 @@ -#!/bin/sh -#*/5 * * * * /usr/share/rrd/makegraphs >/dev/null - -# RRD database directory -rrdlog="/var/spool/rrd" - -# Images directory -rrdgraph="/var/spool/rrd" - -# Colors -#rrdcolors="--color SHADEA#EAE9EE --color SHADEB#EAE9EE --color BACK#EAE9EE" -rrdcolors="--color SHADEA#FFFFFF --color SHADEB#FFFFFF --color BACK#FFFFFF" -rrdgraphargs="-aPNG -i -z --alt-y-grid -w 600 -h 100 -r $rrdcolors" - -[ -d $rrdlog ] || mkdir -p $rrdlog -[ -d $rrdgraph ] || mkdir -p $rrdgraph - -updatecpudata() { - [ -e "$rrdlog/cpu.rrd" ] || rrdtool create $rrdlog/cpu.rrd --step=300 \ - DS:user:COUNTER:600:0:500000000 \ - DS:system:COUNTER:600:0:500000000 \ - DS:idle:COUNTER:600:0:500000000 \ - RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 \ - RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460 - grep '^cpu' /proc/stat | while read cpu user nice system idle misc; do - rrdtool update $rrdlog/cpu.rrd -t user:system:idle \ - N:$(( $user + $nice )):$system:$idle - break - done - - [ -e "$rrdlog/cpu2.rrd" ] && - grep '^cpu' /proc/stat | while read cpu user nice system idle misc; do - rrdtool update $rrdlog/cpu2.rrd -t nice:user:system:idle \ - N:$nice:$user:$system:$idle - break - done -} - -updatecpugraph() { - period=$1 - info="$(grep '^model name' /proc/cpuinfo | cut -d: -f2 | head -1)" - rrdtool graph "$rrdgraph/cpu-$period.png" --start -1$period \ - $rrdgraphargs -l 0 -u 100 -t "cpu usage per $period [$info ]" \ - DEF:user=$rrdlog/cpu.rrd:user:AVERAGE \ - DEF:system=$rrdlog/cpu.rrd:system:AVERAGE \ - DEF:idle=$rrdlog/cpu.rrd:idle:AVERAGE \ - 'CDEF:total=user,system,idle,+,+' \ - 'CDEF:userpct=100,user,total,/,*' \ - 'CDEF:systempct=100,system,total,/,*' \ - 'CDEF:idlepct=100,idle,total,/,*' \ - 'AREA:userpct#0000FF:user cpu usage' \ - 'STACK:systempct#FF0000:system cpu usage' \ - 'STACK:idlepct#00FF00:idle cpu usage\j' -} - - -updatememgraph() { - period=$1 - info="$(free | awk '\ -{ \ - if (/Mem:/) { \ - if ($2 < 10000) printf "%d KB",$2; \ - else if ($2 < 10000000) printf "%d MB",$2/1024; \ - else printf "%d GB",$2/1024/1024; \ - } \ -}')" - info2="$(free | awk '\ -{ \ - if (/Swap:/) { \ - if ($2 < 10000) printf "%d KB",$2; \ - else if ($2 < 10000000) printf "%d MB",$2/1024; \ - else printf "%d GB",$2/1024/1024; \ - } \ -}')" - rrdtool graph "$rrdgraph/memory-$period.png" --start -1$period \ - $rrdgraphargs -l 0 -u 100 \ - -t "memory usage per $period [ $info + $info2 swap ]" \ - DEF:used=$rrdlog/mem.rrd:memused:AVERAGE \ - DEF:free=$rrdlog/mem.rrd:memfree:AVERAGE \ - DEF:shared=$rrdlog/mem.rrd:memshared:AVERAGE \ - DEF:buffer=$rrdlog/mem.rrd:membuffers:AVERAGE \ - DEF:cache=$rrdlog/mem.rrd:memcache:AVERAGE \ - DEF:swused=$rrdlog/mem.rrd:swapused:AVERAGE \ - DEF:swfree=$rrdlog/mem.rrd:swapfree:AVERAGE \ - 'CDEF:total=used,free,+' \ - 'CDEF:used2=used,buffer,cache,shared,+,+,-' \ - 'CDEF:usedpct=100,used2,total,/,*' \ - 'CDEF:sharedpct=100,shared,total,/,*' \ - 'CDEF:bufferpct=100,buffer,total,/,*' \ - 'CDEF:cachepct=100,cache,total,/,*' \ - 'CDEF:freepct=100,free,total,/,*' \ - 'CDEF:swtotal=swused,swfree,+' \ - 'CDEF:swusedpct=100,swused,swtotal,/,*' \ - 'AREA:usedpct#0000FF:used memory' \ - 'STACK:sharedpct#FF7F00:shared memory' \ - 'STACK:bufferpct#FF00FF:buffered memory' \ - 'STACK:cachepct#FFFF00:cached memory' \ - 'STACK:freepct#00FF00:free memory' \ - 'LINE2:swusedpct#FF0000:used swap\j' -} - -updatememdata () { - [ -e "$rrdlog/mem.rrd" ] || - rrdtool create "$rrdlog/mem.rrd" --step=300 \ - DS:memused:ABSOLUTE:600:0:5000000000 \ - DS:memfree:ABSOLUTE:600:0:5000000000 \ - DS:memshared:ABSOLUTE:600:0:5000000000 \ - DS:membuffers:ABSOLUTE:600:0:5000000000 \ - DS:memcache:ABSOLUTE:600:0:5000000000 \ - DS:swapused:ABSOLUTE:600:0:5000000000 \ - DS:swapfree:ABSOLUTE:600:0:5000000000 \ - RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 \ - RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460 - - while read tag count unit; do - case "$tag" in - MemTotal:) memtotal=$(($count * 1024));; - MemFree:) memfree=$(($count * 1024)) - memused=$(($memtotal - $memfree)) - memshared=0;; - MemShared:) memshared=$(($count * 1024));; - Buffers:) membuffers=$(($count * 1024));; - Cached:) memcache=$(($count * 1024));; - SwapTotal:) swaptotal=$(($count * 1024));; - SwapFree:) swapfree=$(($count * 1024)) - swapused=$(( $swaptotal - $swapfree));; - esac - done < /proc/meminfo - - rrdtool update "$rrdlog/mem.rrd" \ - -t memused:memfree:memshared:membuffers:memcache:swapused:swapfree \ - "N:$memused:$memfree:$memshared:$membuffers:$memcache:$swapused:$swapfree" -} - -getmax() { - rrdtool fetch $rrdlog/$1.rrd AVERAGE | awk '\ -BEGIN {max=0} \ -/^[0-9]/ { \ - if ($2 != "nan" && $2 > max) max=$2; \ - if ($3 != "nan" && $3 > max) max=$3; \ -} \ -END { print max }' | sed 's/,/./' -} - -updatediskgraph() { - period=$1 - [ "$period" == "day" ] && maxdisk="$(getmax disk)" - info="" - [ -r $2 ] && - info="[ $(fdisk -l | grep "^Disk $2:" | \ - sed "s|Disk $2: \(.*\), .*|\1|") ]" - rrdtool graph "$rrdgraph/disk-$period.png" --start -1$period \ - $rrdgraphargs -t "disk access per $period $info" \ - --logarithmic --lower-limit 1 -v "Sectors/second" --units=si \ - DEF:read=$rrdlog/disk.rrd:readsect:AVERAGE \ - DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE \ - DEF:req=$rrdlog/iodisk.rrd:req:AVERAGE \ - DEF:done=$rrdlog/iodisk.rrd:done:AVERAGE \ - DEF:err=$rrdlog/iodisk.rrd:err:AVERAGE \ - "CDEF:readpct=100,read,$maxdisk,/,*" \ - "CDEF:writepct=100,write,$maxdisk,/,*" \ - "CDEF:errpct=100,err,req,/,*" \ - "CDEF:donepct=100,done,req,/,*" \ - 'AREA:readpct#0000FF:sectors read from disk' \ - 'STACK:writepct#00FF00:sectors written to disk' \ - 'LINE2:donepct#FFFF00:I/O complete' \ - 'LINE2:errpct#FF0000:I/O error\j' -} - -updatediskdata() { - dev=$1 - [ -e "$rrdlog/disk.rrd" ] || - rrdtool create "$rrdlog/disk.rrd" --step=300 \ - DS:readsect:COUNTER:600:0:5000000000 \ - DS:writesect:COUNTER:600:0:5000000000 \ - RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 \ - RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460 - [ -e "$rrdlog/iodisk.rrd" ] || - rrdtool create "$rrdlog/iodisk.rrd" --step=300 \ - DS:done:GAUGE:600:0:U DS:err:GAUGE:600:0:U \ - DS:req:GAUGE:600:0:U \ - RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 \ - RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460 - - while read major minor name readreq readsect writereq writesect misc; do - [ $major = $(( 0x$(stat -c %t $dev) )) ] || continue - [ $minor = $(( 0x$(stat -c %T $dev) )) ] || continue - rrdtool update "$rrdlog/disk.rrd" -t readsect:writesect \ - N:$readsect:$writesect - done < /proc/diskstats - dir=/sys/block/${dev#/dev/}/device - done=$(printf "%d\n" $(cat $dir/iodone_cnt 2> /dev/null) ) - err=$(printf "%d\n" $(cat $dir/ioerr_cnt 2> /dev/null) ) - req=$(printf "%d\n" $(cat $dir/iorequest_cnt 2> /dev/null) ) - rrdtool update "$rrdlog/iodisk.rrd" -t done:err:req N:$done:$err:$req -} - -updateifgraph() { - interface=$1 - period=$2 - [ "$period" == "day" ] && maxif="$(getmax $interface)" - rrdtool graph "$rrdgraph/$interface-$period.png" --start -1$period \ - $rrdgraphargs -t "traffic on $interface graph per $period" \ - --logarithmic -A -v "Bytes/second" --units=si \ - DEF:incoming=$rrdlog/$interface.rrd:incoming:AVERAGE \ - DEF:outgoing=$rrdlog/$interface.rrd:outgoing:AVERAGE \ - "CDEF:inpct=100,incoming,$maxif,/,*" \ - "CDEF:outpct=100,outgoing,$maxif,/,*" \ - 'AREA:inpct#00FF00:incoming traffic' \ - 'LINE1:outpct#0000FF:outgoing traffic\j' -} - -netframes() { -ifconfig $1 | grep "$2 packets" | sed -re "s/.*$3:([0-9]+).*/\1/g" -} - -netstats() { -ifconfig $1 | grep bytes | sed -re "s/.*$2 bytes:([0-9]+).*/\1/g" -} - -updateifdata() { - interface=$1 - [ -e "$rrdlog/$interface.rrd" ] || - rrdtool create "$rrdlog/$interface.rrd" --step=300 \ - DS:incoming:COUNTER:600:0:U \ - DS:outgoing:COUNTER:600:0:U \ - RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 \ - RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460 - [ -e "$rrdlog/packets-$interface.rrd" ] || - rrdtool create "$rrdlog/packets-$interface.rrd" --step=300 \ - DS:in:COUNTER:600:0:U DS:out:COUNTER:600:0:U \ - DS:inerr:COUNTER:600:0:U DS:outerr:COUNTER:600:0:U \ - DS:indrop:COUNTER:600:0:U DS:outdrop:COUNTER:600:0:U \ - DS:inov:COUNTER:600:0:U DS:outov:COUNTER:600:0:U \ - DS:frame:COUNTER:600:0:U DS:carrier:COUNTER:600:0:U \ - RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:672 \ - RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460 - rx=$(netstats $interface RX) - tx=$(netstats $interface TX) - rrdtool update "$rrdlog/$interface.rrd" -t incoming:outgoing \ - N:${rx:-U}:${tx:-U} - rx=$(netframes $interface RX packets) - tx=$(netframes $interface TX packets) - rxerr=$(netframes $interface RX errors) - txerr=$(netframes $interface TX errors) - rxdrop=$(netframes $interface RX dropped) - txdrop=$(netframes $interface TX dropped) - rxov=$(netframes $interface RX overruns) - txov=$(netframes $interface TX overruns) - frame=$(netframes $interface RX frame) - carrier=$(netframes $interface TX carrier) - rrdtool update "$rrdlog/packets-$interface.rrd" \ - -t in:out:inerr:outerr:indrop:outdrop:inov:outov:frame:carrier \ - N:${rx:-U}:${tx:-U}:${rxerr:-U}:${txerr:-U}:${rxdrop:-U}:${txdrop:-U}:${rxov:-U}:${txov:-U}:${frame:-U}:${carrier:-U} -} - -getdisk() -{ - local d - local i - d=$(stat -c %D $1) - for i in /dev/* ; do - [ $(stat -c "%02t%02T" $i) == $d ] || continue - echo $i - break - done -} - -### -### System graphs -### - -updatecpudata -updatecpugraph day -updatecpugraph week -updatecpugraph month -updatecpugraph year - -updatememdata -updatememgraph day -updatememgraph week -updatememgraph month -updatememgraph year - -if [ -e /proc/diskstats ]; then - disk=$(getdisk $0) - updatediskdata $disk - updatediskgraph day ${disk:0:8} - updatediskgraph week ${disk:0:8} - updatediskgraph month ${disk:0:8} - updatediskgraph year ${disk:0:8} -fi - -iface=$(/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }') -updateifdata $iface -updateifgraph $iface day -updateifgraph $iface week -updateifgraph $iface month -updateifgraph $iface year diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/usr/share/slitaz-live/INSTALL --- a/mirror-tools/stuff/usr/share/slitaz-live/INSTALL Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -#!/bin/sh -DIR=$(dirname $0) -MOUNTS="/proc /sys /dev/pts /dev/shm" -cp /etc/resolv.conf etc -for i in $MOUNTS; do - [ -d $i ] && mount --bind $i $DIR/$i -done -#mount --bind /var/tmp tmp -mount --bind /tmp tmp || mount -t tmpfs tmpfs tmp -SHELL=/bin/ash chroot $DIR /bin/ash - -umount tmp -for i in $MOUNTS; do - umount $DIR/$i -done diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/favicon.ico Binary file mirror-tools/stuff/var/www/mirror-info/favicon.ico has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/graphs.php --- a/mirror-tools/stuff/var/www/mirror-info/graphs.php Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ - - - - Mirror RRD stats - - - - - - - - - - - - - - - -
-
-
-
- - -
- -

Mirror RRD stats

-

/usr/bin/rrdtool

- -'."\n"; -} - -function graphic($res, $img='') -{ - global $myurl; - if (!$img) $img=$res; - echo ""; - echo "\n"; - one_graphic($img."-day.png",$res." daily"); - echo ""; - if (isset($_GET['stats']) && $_GET['stats'] == $res) { - one_graphic($img."-week.png",$res." weekly"); - one_graphic($img."-month.png",$res." monthly"); - one_graphic($img."-year.png",$res." yearly"); - } -} - -echo "

CPU

\n"; -graphic("cpu"); -echo "

Memory

\n"; -graphic("memory"); -echo "

Disk

\n"; -graphic("disk"); -echo "

Network

\n"; -graphic("net","eth0"); - -?> - - -
-
-
-
-
- - -
-

-Last update : -

-

-Copyright © SliTaz - -GNU General Public License -

- -
- - -
-

-Valid XHTML 1.0 -

-
- - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/index.php --- a/mirror-tools/stuff/var/www/mirror-info/index.php Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,287 +0,0 @@ - - - - SliTaz Mirror - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -

Server

-

Codename: -

- -

-Mirror CPU is a - -= 1024) { x /= 1024; ". -"n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ". -"printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> - -Located in France next to Roubaix. This page has real time statistics -provided by PHP system(). Mirror is also monitored by RRDtool -which provides graphical stats. -

- -

- graphs - System stats

- -

Uptime

- -
-
-
- -

Disk usage

-
-
-
- -

Network

-
-
-
- - -

Logins

-
-
-
- -

Processes

-
-
-
- - - -

- vhostsVirtual hosts

- - - - -

- replicasTank replicas

- - - - -

- mirrorsMirrors

- Most mirrors are updated using the url: rsync://mirror.slitaz.org/slitaz/ - (stats) - - - -

builds - Daily builds

- -'; -echo ""; -system("stat -c '

%y %n

' ".$file." | sed -e 's/.000000000//' -e 's|/var/log/\(.*\).log|\\1.iso|'"); -echo "
"; -echo "
";
-system("cat ".$file." | sed -e 's/.\[[0-9][^mG]*.//g' | awk '".
-'{ if (/\[/) { n=index($0,"["); printf("%s%s%s\n",substr($0,1,n-1),'.
-'substr("\t\t\t\t\t\t\t",1,9-(n/8)),substr($0,n)); } else print }'."'");
-echo "
"; -} - -display_log("/var/log/packages-stable.log", "buildstable", "/iso/stable/packages-3.0.iso"); -display_log("/var/log/packages-cooking.log","buildcooking","/iso/cooking/packages-cooking.iso"); -?> - -
-
-
-
-
- - -
-

-Last update : -

-

-Copyright © SliTaz - -GNU General Public License -

- -
- - -
-

-Valid XHTML 1.0 -

-
- - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/desktop.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/desktop.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-day.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-day.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/cpu-day.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-month.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-month.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/cpu-month.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-week.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-week.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/cpu-week.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-year.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/cpu-year.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/cpu-year.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-day.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-day.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/disk-day.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-month.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-month.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/disk-month.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-week.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-week.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/disk-week.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-year.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/disk-year.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/disk-year.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-day.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-day.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/eth0-day.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-month.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-month.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/eth0-month.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-week.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-week.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/eth0-week.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-year.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/eth0-year.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/eth0-year.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-day.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-day.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/memory-day.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-month.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-month.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/memory-month.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-week.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-week.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/memory-week.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-year.png --- a/mirror-tools/stuff/var/www/mirror-info/pics/rrd/memory-year.png Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/home/bellard/Public/pics/rrd/memory-year.png \ No newline at end of file diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/slitaz-awstats.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/slitaz-awstats.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/slitaz.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/slitaz.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/br.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/br.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/ch.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/ch.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/cn.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/cn.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/fr.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/fr.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/header.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/header.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/it.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/it.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/logo.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/logo.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/logo.xcf Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/logo.xcf has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/monitor.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/monitor.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/nl.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/nl.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/si.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/si.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/us.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/us.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/vhosts.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/vhosts.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/pics/website/xhtml10.png Binary file mirror-tools/stuff/var/www/mirror-info/pics/website/xhtml10.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/mirror-info/slitaz.css --- a/mirror-tools/stuff/var/www/mirror-info/slitaz.css Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,382 +0,0 @@ -/* - CSS style for SliTaz GNU/Linux website - www.slitaz.org - (c) 2007 Pankso -*/ - -html { - height: 102%; -} - -body { - background: #ffffff; - color: black; - font: 13px sans-serif, vernada, arial; - margin: 0; -} - -/* Accessibility */ - -#access { - position: absolute; - top: 4px; - right: 4px; - text-align: right; - width: 100%; - margin: 0; - font-size: 11px; - font-weight: bold; -} - -#access a { - background: inherit; - color: white; - text-decoration: none; -} - -#access a:hover { - background: inherit; - color: #222222; -} - -/* Header and title */ - -#header{ - background: #f0ba08 url(pics/website/header.png) repeat-x top; - color: black; - width: 100%; - height: 50px; - border-top: 1px solid black; - border-bottom: 1px solid black; - margin-bottom: 30px; -} - -#titre { - position: absolute; - font-size: 16px; - font-weight: bolder ; - margin-left: 200px; - margin-top: 28px; -} - -#logo { - position: absolute; - float: left; - margin-left: 16px; - margin-top: 0px; -} - -/* Navigation */ - -#nav { - position: absolute; - top: 76px; - right: 40px; - color: #555555; - float: right; - width: 250px; - line-height: 1.5em; - text-align: left; - font-size: 12px; -} - -#nav ul { - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - list-style-type: none; - margin: 10px 0; - padding: 10px 24px 10px 24px; - background-color: #eaeaea; -} - -#nav .nav_box ul { - list-style-type: none; - margin: 0; - padding: 10px 24px 10px 0px; -} - -#nav li { - display: inline; -} - -#nav h4 { - font-size: 110%; - color: #666666; - font-weight: bold; - margin: 0; - padding: 0 0 1px 0; - border-bottom: 1px solid #cecece; -} - -#nav a { - color: #0F314E; - background: inherit; - display: block; - text-decoration: none; - font-weight: bold; -} - -#nav a:hover { - color: #DF8F06; - text-decoration: none; - display: block; -} - -#nav hr { - margin: 2px 0px 1px 0px; - border: 0px; - border-top: 1px solid #BDBDBD; - -} - -.nav_box { - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - margin: 10px 0; - padding: 10px 24px 10px 24px; - background-color: #eaeaea; - text-align: justify; -} - -#nav .nav_box p { - line-height: 1.3em; -} - -#nav .nav_box p a { - display: inline; - font-weight: normal; - text-decoration: none; -} - -#nav .nav_box p a:hover { - text-decoration: none; - color: #DF8F06; - background: inherit; -} - -#nav hr { - height: 0px; - border: 0px solid #eaeaea; -} - -/* Page content */ - -#content, #content_bottom, #content_top { - background: white; - color: black; - text-align: justify; -} - -#content { - height: auto; - margin: 6px 280px 0px 0px; - padding: 0px 40px 60px 40px; -} - -#content li { - line-height: 1.5em; - text-align: left; -} - -/* Legal informations */ - -#copy { - font-size: 11px ; - text-align: center ; - background: transparent; - color: #a8a8a8; - padding-top: 10px; -} - -#copy a { - background: inherit; - color: #a8a8a8; -} - -#copy a:hover { - background: inherit; - color: #666666; -} - -/* Footer */ - -#bottom { - float: none; - background: inherit; - color: black; - width: auto; - clear: both; - padding: 0; - margin: 0; - text-align: center; - vertical-align: middle; -} - -#news li { - list-style-type: square; - border-bottom: 1px dotted #BEBEBE; - margin-left: -25px; - padding: 4px 0px 4px 0px; -} - -#gallery { - text-align: center; -} - -#gallery table { - margin: 30px 0px 30px 0px; -} - -/* Clouds */ - -#cloud { - padding: 20px 0px 20px 0px; - line-height: 3em; - text-align: center; -} -#cloud a { padding: 4px; color: #956411; } -#cloud a.tag1 { font-size: 0.7em; font-weight: 100; } -#cloud a.tag2 { font-size: 0.8em; font-weight: 200; } -#cloud a.tag3 { font-size: 0.9em; font-weight: 300; } -#cloud a.tag4 { font-size: 1.0em; font-weight: 400; } -#cloud a.tag5 { font-size: 1.2em; font-weight: 500; } -#cloud a.tag6 { font-size: 1.4em; font-weight: 600; } -#cloud a.tag7 { font-size: 1.6em; font-weight: 700; } -#cloud a.tag8 { font-size: 1.8em; font-weight: 800; } -#cloud a.tag9 { font-size: 2.2em; font-weight: 900; } -#cloud a.tag10 { font-size: 2.5em; font-weight: 900; } - -/* CSS class. */ - -.infobox { - margin: 10px; - padding: 12px; - background: #f2f2f2; - border: 1px solid #eaeaea; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; -} - -/* HTML styles */ - -h1 { - color: blue; - background: inherit; - text-align: left; - margin: 0px 0px 10px 0px; - font-size: 140%; - font-weight: bold; -} - -h2 { - color: #DF8F06; - /* border-top: 1px solid #f3f3f3; */ - border-left: 8px solid #f3f3f3; - padding: 4px 0px 4px 4px; - margin: 0; - font-size: 140%; - font-weight: bold; -} - -h3 { - font-weight: bold; - color: #6c0023; - background: inherit; -} - -h3 img { - vertical-align: middle; - padding-right: 4px; -} - -a { - text-decoration: underline; - color: #0F314E; - background: inherit; -} - -a:hover { - text-decoration: none; - color: blue; - background: inherit; -} - -code { - font-size: 12px; - color: #669900; - background: inherit; -} - -tt { - color: #15EE15; - background: inherit; -} - -img { - border: 0pt none; -} - -fieldset { - background: #E2ECf6; - color: black; - margin-top: 25px; - border: 1px solid black; -} - -legend { - border: 1px solid black; - color: #6c0023; - background: #eaeaea; - font-weight: bold; -} - -pre { - padding: 5px; - color: black; - background: #E1E0B0; -} - -pre.script { - padding: 10px; - color: black; - background: #E8E8E8; - border: 1px inset #606060; -} - -textarea { - background: #E5E5E5; - margin-top: 12px; -} - -input[type=submit] { - background: #E5E5E5; - color: black; - border: 1px outset #111111; - font-weight: bold; -} - -input[type=submit]:hover { - background: #F3F3F3; - color: black; -} - -/* Packages pages */ - -.pkg_nav { - border-top: 1px solid black; - margin-top: 10px; - padding-top: 10px; -} - -pre.package { - padding: 0px; - color: black; - background: white; -} - -p.get { - text-align: center; - padding: 10px; - color: black; - background: #F3F3F3; - border: 1px solid #DEDEDE; -} diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/favicon.ico Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/favicon.ico has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/Directory Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/Directory has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/application_octet-stream Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/application_octet-stream has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_fd Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_fd has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_iso Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_iso has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_md5 Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_md5 has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_tar.gz Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_tar.gz has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_tazpkg Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/file_tazpkg has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/text_plain Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/mime/text_plain has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/header-img.png Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/header-img.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/logo.png Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/logo.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/network.png Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/network.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/users.png Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/users.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/xhtml10.png Binary file mirror-tools/stuff/var/www/slitaz/mirror/css/pics/website/xhtml10.png has changed diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/css/slitaz.css --- a/mirror-tools/stuff/var/www/slitaz/mirror/css/slitaz.css Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,587 +0,0 @@ -/* - CSS style for SliTaz GNU/Linux website - www.slitaz.org - (c) 2011 Pankso -*/ - -html { - min-height: 102%; -} - -body { - background: #ffffff; - color: black; - font: 13px sans-serif, vernada, arial; - margin: 0; - border-top: 34px solid #f1f1f1; -} - -/* Accessibility */ - -#access { - position: absolute; - top: 4px; - right: 0px; - text-align: right; - width: auto; - margin: 0; - padding: 4px 4px 4px 20px; - font-size: 11px; - font-weight: bold; -} - -#access a { - background: transparent; - color: #0F314E; - text-decoration: none; -} - -#access a:hover { - background: inherit; - color: #b64b22; -} - -#access img { - vertical-align: middle; -} - -/* Header and title */ - -#header { - /*background: #f0ba08 url(pics/website/header.png) repeat-x top;*/ - background: #351a0a url(pics/website/header-img.png) no-repeat top right; - color: black; - width: 100%; - height: 42px; - border-top: 1px solid black; - border-bottom: 1px solid #999; - margin-bottom: 33px; -} - -#titre { - position: absolute; - font-size: 14px; - font-weight: bolder ; - left: 180px; - top: 4px; -} - -#logo { - position: absolute; - float: left; - left: 16px; - top: -10px; - width: 200px; - height: 74px; -} - -/* Side bar Navigation */ - -#nav { - position: absolute; - top: 102px; - right: 80px; - color: #555555; - float: right; - width: 250px; - line-height: 1.5em; - text-align: left; - font-size: 12px; -} - -#nav .nav_box ul { - list-style-type: none; - margin: 0; - padding: 10px 24px 10px 0px; - background-color: inherit; -} - -#nav li { - display: inline; -} - -#nav h4 { - font-size: 120%; - color: #666666; - font-weight: bold; - margin: 0; - padding: 0 0 1px 0; - border-bottom: 1px solid #cecece; -} - -#nav a { - color: #0F314E; - background: inherit; - display: block; - text-decoration: none; - font-weight: bold; -} - -#nav a:hover { - color: #b64b22; - text-decoration: none; - display: block; -} - -#nav ul { - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - list-style-type: none; - margin: 10px 0; - padding: 10px 24px 10px 24px; - background-color: #eaeaea; -} - -.nav_box { - margin: 10px 0; - padding: 10px 24px 10px 24px; - background-color: #eaeaea; - text-align: justify; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; - /* CSS3 transition */ - -webkit-transition-property: background-color; - -webkit-transition-duration: 2s; - -moz-transition-property: background-color; - -moz-transition-duration: 2s; - transition-property: background-color; - transition-duration: 2s; -} - -.nav_box:hover { background-color: #f8f8f8; } - -#nav .nav_box p { - line-height: 1.3em; -} - -#nav .nav_box p a { - display: inline; - font-weight: normal; - text-decoration: underline; -} - -#nav .nav_box p a:hover { - text-decoration: none; - color: blue; - background: inherit; -} - -/* Page content */ - -#content { - background: white; - color: black; - text-align: justify; - height: auto; - margin: 6px 320px 0px 0px; - padding: 0px 40px 60px 80px; -} - -#content-full { - background: white; - color: black; - text-align: justify; - height: auto; - margin: 0; - padding: 0px 80px 40px 80px; -} - -#content li, #content-full li { - line-height: 1.5em; - text-align: left; -} - -#news li { - list-style-type: square; - border-bottom: 1px dotted #BEBEBE; - margin-left: -25px; - padding: 4px 0px 4px 0px; -} - -#news a { - text-decoration: none; -} - -#gallery { - text-align: center; -} - -/* Box and block. */ - -.infobox { - margin: 20px 60px; - padding: 12px; - background: #f8f8f8; -} - -.infobox img { vertical-align: middle; } -/* .infobox:hover { background-color: #f2b21d; } */ -.infobox:hover { background-color: #FBFBFB; } - -.block { - /*padding-bottom: 35%;*/ - color: black; - min-height: 200px; - margin-bottom: 40px; -} - -.block ul { - list-style-type: none; - margin: 0; - padding: 0 20px; -} - -.block_left { - width: 46%; - float: left; - background-color: #eaeaea; - margin: 4px 2px; - padding: 0 10px 10px 10px; -} - -.block_right { - width: 46%; - float: right; - background-color: #eaeaea; - margin: 4px 2px; - padding: 0 10px 10px 10px; -} - -#block_top { - color: black; - background-color: #eaeaea; - min-height: 180px; - margin-bottom: 40px; - margin-right: 340px; - padding: 0 10px; -} - -#block_nav { - width: 300px; - min-height: 180px; - float: right; - background-color: #eaeaea; - margin: 0; - padding: 0 10px; -} - -.infobox, .block_left, .block_right, #block_top, #block_nav, #footer { - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; - /* CSS3 transition */ - -webkit-transition-property: background-color; - -webkit-transition-duration: 2s; - -moz-transition-property: background-color; - -moz-transition-duration: 2s; - transition-property: background-color; - transition-duration: 2s; -} - -#block_nav { - font-weight: bold; -} - -#block_nav a { - text-decoration: none; -} - -#block_nav li a:hover { - color: #b64b22; -} - -#block_nav ul { - margin: 0; - list-style-type: none; -} - -#block_nav h3 { - font-size: 110%; -} - -.block_left:hover, .block_right:hover, #block_top:hover, -#block_nav:hover, #footer:hover { - background-color: #f8f8f8; -} - -.right_box { - width: 50%; - float: right; -} - -.floor { - color: #999999; - font-size: 20px; - -webkit-transform: rotate(-45deg) skew(15deg, 15deg); - -moz-transform: rotate(-45deg) skew(15deg, 15deg); - -o-transform: rotate(-45deg) skew(15deg, 15deg); - -ms-transform: rotate(-45deg) skew(15deg, 15deg); - transform: rotate(-45deg) skew(15deg, 15deg); -} - -/* Button */ - -.button { margin-left: 20px; } - -.button a { - background-color: #b64b22; - color: #ffffff; - margin-right: 6px; - padding: 6px 10px; - font-size: 14px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; -} - -.button a:hover, input[type=submit]:hover { - background-color: #a3431f; - color: #ffffff; -} - -input[type=submit] { - border: 1px solid #b64b22; - background-color: #b64b22; - color: white; - font-weight: bold; - cursor: pointer; - padding: 2px 10px; - font-size: 14px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - -moz-box-shadow: 0 0 5px #666; - -webkit-box-shadow: 0 0 5px#666; - box-shadow: 0 0 5px #666; -} - -input[type=text] { - border: 1px solid #333333; - padding: 3px; - width: 100%; - max-width: 500px; -} - -/* Clouds */ - -#cloud { - padding: 10px 0px; - line-height: 3em; - text-align: center; -} -#cloud a { padding: 0 2px; color: #956411; } -#cloud a.tag1 { font-size: 0.7em; font-weight: 100; } -#cloud a.tag2 { font-size: 0.8em; font-weight: 200; } -#cloud a.tag3 { font-size: 0.9em; font-weight: 300; } -#cloud a.tag4 { font-size: 1.0em; font-weight: 400; } -#cloud a.tag5 { font-size: 1.2em; font-weight: 500; } -#cloud a.tag6 { font-size: 1.4em; font-weight: 600; } -#cloud a.tag7 { font-size: 1.6em; font-weight: 700; } -#cloud a.tag8 { font-size: 1.8em; font-weight: 800; } -#cloud a.tag9 { font-size: 2.2em; font-weight: 900; } -#cloud a.tag10 { font-size: 2.5em; font-weight: 900; } - -/* Slideshow. */ - -#slideshow -{ - overflow: hidden; - margin: 10px auto 10px; - position: relative; - width: 260px; - height: 163px; -} - -#slideshow img -{ - border: 0; - width: 260px; - height: 163px; -} - -#twitter { - margin-top: 20px; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; -} - -/* HTML styles */ - -h1 { - color: #444444; - background: transparent; - text-align: left; - margin: 0px 0px 4px 0px; - font-size: 150%; - font-weight: bold; - padding: 5px 0 0 10px; -} - -h2 { - color: #b64b22; - padding: 0; - margin: 20px 0 0 0; - font-size: 130%; - font-weight: bold; -} - -h3 { - font-weight: bold; - color: #666666; - background: transparent; -} - -h3 img { - vertical-align: middle; - width: 20px; - height: 20px; - padding-right: 4px; -} - -a { - text-decoration: underline; - color: #103A5E; - background: inherit; -} - -a:hover { - text-decoration: none; - color: blue; - background: inherit; -} - -code { - font-size: 12px; - color: #669900; - background: inherit; -} - -tt { - color: #15EE15; - background: inherit; -} - -img { - border: 0pt none; -} - -fieldset { - background: #E2ECf6; - color: black; - margin-top: 25px; - border: 1px solid black; -} - -legend { - border: 1px solid black; - color: #6c0023; - background: #eaeaea; - font-weight: bold; -} - -pre { - padding: 5px; - color: black; - background: #E1E0B0; -} - -pre.script { - padding: 10px; - color: black; - background: #E8E8E8; - border: 1px inset #606060; -} - -textarea { - background: #E5E5E5; - margin-top: 12px; -} - -/* Packages pages */ - -.pkg_nav { - border-top: 1px solid black; - margin-top: 10px; - padding-top: 10px; -} - -pre.package { - padding: 0px; - color: black; - background: white; -} - -p.get { - text-align: center; - padding: 10px; - color: black; - background: #F3F3F3; - border: 1px solid #DEDEDE; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; -} - -p.get a { - font-weight: bold; - text-decoration: none; -} - -.pkgs-search { - text-align: center; - padding: 40px 20px 80px 20px; -} - -.year:after { - /* content: "2007-2011"; */ - content: "2011"; -} - -/* Footer */ - -#footer { - margin: 0px 80px 80px 80px; - padding: 10px; - background: #eaeaea; - color: #666666; - height: 180px; - clear: both; - border-radius: 8px; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; -} -#footer a { - background: inherit; - color: #666666; -} -#footer a:hover { - background: inherit; - color: #333333; -} -#footer ul { - list-style-type: none; -} -#footer li { - padding: 2px; -} -#footer h4 { - margin: 0 20px; - font-size: 125%; -} diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/dir-generator.php --- a/mirror-tools/stuff/var/www/slitaz/mirror/dir-generator.php Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,442 +0,0 @@ - - - - - SliTaz mirror redirection - - - - - - -, - * Pascal Bellard - * Christophe Lincoln - * - * - * GNU License Agreement - * --------------------- - * This program 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 - * (at your option) any later version. - * - * This program 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * http://www.gnu.org/licenses/gpl.txt - */ - -// Get the path (cut out the query string from the request_uri) -list($path) = explode('?', $_SERVER['REQUEST_URI']); - - -// Get the path that we're supposed to show. -$path = ltrim(rawurldecode($path), '/'); - - -if(strlen($path) == 0) { - $path = "./"; -} - - -// Can't call the script directly since REQUEST_URI won't be a directory -if($_SERVER['PHP_SELF'] == '/'.$path) { - redirect(); -// die("Unable to call " . $path . " directly."); -} - - -$vpath = ($path != "./")?$path:""; -// Make sure it is valid. -if(!is_dir($path)) { -// die("" . $path . " is not a valid path."); - $path = dirname($_SERVER["SCRIPT_FILENAME"]); - list($vpath) = explode('?', $_SERVER['REQUEST_URI']); - $vpath = ltrim(rawurldecode($vpath), '/'); -} - - -// -// This function returns the file size of a specified $file. -// -function format_bytes($size, $precision=1) { - $sizes = array('Y', 'Z', 'E', 'P', 'T', 'G', 'M', 'K', ''); - $total = count($sizes); - - while($total-- && $size > 1024) $size /= 1024; - if ($sizes[$total] == '') { - $size /= 1024; - $total--; - } - return sprintf('%.'.$precision.'f', $size).$sizes[$total]; -} - - -// -// Get some variables from /etc/lighttpd/lighttpd.conf -// -$conf_lightty = file_get_contents("/etc/lighttpd/lighttpd.conf"); - -function get_conf($var,$start,$stop,$default='') { - global $conf_lightty; - - if (!preg_match('/'.$var.'/',$conf_lightty)) return $default; - $filter = '/(.*\n)*'.$var.'\s*=\s*'.$start.'(([^'.$stop.']*\n*)*)'.$stop.'(.*\n)*/'; - return preg_replace($filter,'$2',$conf_lightty); -} - -$encoding = get_conf('dir-listing.encoding','"','"','ascii'); -$external_css = get_conf('dir-listing.external-css','"','"'); - -$show_hidden_files = false; -if (get_conf('dir-listing.hide-dotfile','"','"','disable') == "disable") { - $show_hidden_files = true; -} -// get_conf('dir-listing.exclude','\(','\)'); -// get_conf('dir-listing.set-footer','"','"'); - -$mime_types = array(); -foreach (explode(',',get_conf('mimetype.assign','\(','\)')) as $item) { - $filter = '/\s*"(.*)"\s*=>\s*"(.*)".*/'; - $val = explode(',',preg_replace($filter,'$1,$2',$item)); - if (isset($val[1])) $mime_types[$val[0]] = $val[1]; -} - -// -// This function returns the mime type of $file. -// -function get_file_type($file) { - global $mime_types; - - $file = basename($file); - $default_type = "application/octet-stream"; - if (isset($mime_types[$file])) { - return $mime_types[$file]; - } - $pos = strrpos($file, "."); - if ($pos === false) { - return $default_type; - } -//FIXME .tar.gz - $ext = '.'.rtrim(substr($file, $pos+1), "~"); - if (isset($mime_types[$ext])) { - return $mime_types[$ext]; - } - return $default_type; -} - -//$slitaz_style = (dirname($_SERVER["PHP_SELF"]) == '/'); -$slitaz_style = ($_SERVER["SERVER_NAME"] == "mirror.slitaz.org"); -if ($slitaz_style) { - $fvalue = ""; - if (isset($_GET[f])) $fvalue = 'value="'.$_GET[f].'"'; - print << - - - Index of /$vpath - - - - - - - - - - - - - - -
- - -
- -
-

users.pngCommunity

- -

Search

- - -
- -
-

About Mirror

-

Welcome to Open Source! -EOT; - if ($_SERVER["SERVER_NAME"] == "mirror.slitaz.org") print <<ADS. -EOT; - print << -

.pngMirrors: -EOT; - $mirrors = array(); - $fp = @fopen(dirname($_SERVER["SCRIPT_FILENAME"])."/mirrors","r"); - if ($fp) { - while (($line = fgets($fp)) !== false) { - $line = chop($line); - $url = parse_url($line); - if ($_SERVER["SERVER_NAME"] == $url['host']) continue; - $host = explode('.',$url['host']); - $mirrors[$host[count($host)-2].".". - $host[count($host)-1]] = $line; - } - } - fclose($fp); - foreach($mirrors as $name => $url) { - echo "$name\n"; - } - print << - -

- -
- -EOT; -} -else { - -// Print the heading stuff -print " - - - - Index of /" .$vpath. " -"; -if ($external_css != '') { -print " -"; -} -else { -print " -"; -} -print " - -

Index of /" . $vpath ."

-"; -} - -print "
- -"; - - - -// Get all of the folders and files. -$folderlist = array(); -$filelist = array(); -if($handle = @opendir($path)) { - while(($item = readdir($handle)) !== false) { - if ($item == "index.php") continue; - if ($item == "dir-generator.php") continue; - if (isset($_GET['f'])) { - $filter = $_GET['f']; - if (substr($filter,0,1) != '/') - $filter = '/'.$filter.'/i'; - if (!preg_match($filter,$item)) continue; - } - if(is_dir($path.'/'.$item) and $item != '.' and $item != '..') { - $folderlist[] = array( - 'name' => $item, - 'size' => 0, - 'modtime'=> filemtime($path.'/'.$item), - 'file_type' => "Directory" - ); - } - elseif(is_file($path.'/'.$item)) { - if(!$show_hidden_files) { - if(substr($item, 0, 1) == "." or substr($item, -1) == "~") { - continue; - } - } - $filelist[] = array( - 'name'=> $item, - 'size'=> filesize($path.'/'.$item), - 'modtime'=> filemtime($path.'/'.$item), - 'file_type' => get_file_type($path.'/'.$item) - ); - } - } - closedir($handle); -} - - -if(!isset($_GET['s'])) { - $_GET['s'] = 'name'; -} - -// Figure out what to sort files by -$file_order_by = array(); -foreach ($filelist as $key=>$row) { - $file_order_by[$key] = $row[$_GET['s']]; -} - -// Figure out what to sort folders by -$folder_order_by = array(); -foreach ($folderlist as $key=>$row) { - $folder_order_by[$key] = $row[$_GET['s']]; -} - -// Order the files and folders -$sort_type = SORT_ASC; -$order = "&o=d"; -if(isset($_GET['o'])) { - $sort_type = SORT_DESC; - $order = ""; -} -array_multisort($folder_order_by, $sort_type, $folderlist); -array_multisort($file_order_by, $sort_type, $filelist); - - -// Show sort methods -print ""; - -$sort_methods = array(); -$sort_methods['name'] = "Name"; -$sort_methods['modtime'] = "Last Modified"; -$sort_methods['size'] = "Size"; -$sort_methods['file_type'] = "Type"; - -foreach($sort_methods as $key=>$item) { - if ($_GET['s'] == $key) $key = "$key$order"; - print ""; -} -print "\n\n"; - - - -// Parent directory link -if($path != "./") { - print ""; - print ""; - print ""; - print "\n"; -} - - - -// Print folder information -foreach($folderlist as $folder) { - print ""; - print ""; - print ""; - print "\n"; -} - - -// Print file information -foreach($filelist as $file) { - print ""; - print ""; - print ""; - print "\n"; -} - -// Print ending stuff -$soft = explode('/',$_SERVER["SERVER_SOFTWARE"]); -$tag = get_conf('server.tag','"','"',$soft[0].' <'.$soft[1].'>'); -print " -
$item
Parent Directory/ -  Directory
" .htmlentities($folder['name']). "/" . date('Y-M-d H:m:s', $folder['modtime']) . "-  " . $folder['file_type'] . "
" .htmlentities($file['name']). "" . date('Y-M-d H:m:s', $file['modtime']) . "" . format_bytes($file['size']) . "" . $file['file_type'] . "
-
"; -if ($slitaz_style) { ?> - - -
- - - - - -
".$tag." - - -
- -"; -print " - "; -?> diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/bootloader --- a/mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/bootloader Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ -#!/bin/sh -# -# This script creates a floppy image set from a linux bzImage and can merge -# a cmdline and/or one or more initramfs. -# The total size can not exceed 15M because INT 15H function 87H limitations. -# -# (C) 2009 Pascal Bellard - GNU General Public License v3. - -usage() -{ -cat < /dev/null - [ -n "$DEBUG" ] && printf "store16(%04X) = %04X\n" $1 $2 1>&2 -} - -# write a 32 bits data -# usage: storelong offset data32 file -storelong() -{ - echo $2 | awk '{ printf "\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X", - $1%256,($1/256)%256,($1/256/256)%256,($1/256/256/256)%256 }' | \ - xargs echo -en | \ - dd bs=4 conv=notrunc of=$3 seek=$(( $1 / 4 )) 2> /dev/null - [ -n "$DEBUG" ] && printf "storelong(%04X) = %08X\n" $1 $2 1>&2 -} - -# read a 32 bits data -# usage: getlong offset file -getlong() -{ - dd if=$2 bs=1 skip=$(( $1 )) count=4 2> /dev/null | \ - hexdump -e '"" 1/4 "%d" "\n"' -} - -floppyset() -{ - # bzImage offsets - CylinderCount=496 - SetupSzOfs=497 - FlagsOfs=498 - SyssizeOfs=500 - VideoModeOfs=506 - RootDevOfs=508 - CodeAdrOfs=0x214 - RamfsAdrOfs=0x218 - RamfsLenOfs=0x21C - ArgPtrOfs=0x228 - - # boot+setup address - SetupBase=0x90000 - - stacktop=0x9E00 - - bs=/tmp/bs$$ - - # Get and patch boot sector - # See http://hg.slitaz.org/wok/raw-file/711d076b277c/linux/stuff/linux-header-2.6.34.u - dd if=$KERNEL bs=512 count=1 of=$bs 2> /dev/null - uudecode < /dev/null -begin-base64 644 - -/L+6nWgAkAcGF4n8McC5HQDzq1sfD6mg8X1ABlfFd3ixBvOlZWaPR3gGH8ZF -+D/6l1hB6DQBvgACA3QO6HYBWwseKAJ0LFNH6AoBXuhmAbAgzRCwCM0QTuhl -ATwIdAOIBK05NigCdPDoPgE8CnXgiHz+ieb/TBD/TBi/9AGBTRz/gMdFMACc -sBCxBUi0k4lEHLABiUQUmGaY0+BIZgMFZtPoaAAQB7+AACn4nHMCAccx21BW -6J4AXrkAgLSH/kQczRVYnXfcoRoCvxwCsQk4RBxyuJPNE+oAACCQsEYoyL7b -AejSAF3rI4D5E3IEOMF3a4D+AnIEOOZ3bGCB/QAGdCoGUlFTlrQCULEGtQTB -xQSwDyHoBJAnFEAn6IwA/s117LAgzRDitOiWAJjNE2FSUCjIdwKwAZg5+HIC -ifhQtALNE5VeWFpyoJVBjuGAxwJPdFFOdfSM4ZU4wXVFiMj+xrEBOOZ1O4j0 -/sW2AID9UHIwOi7wAXIqtQBgvt4B/kQMU+gxAFvoOAB1FlKYzRO4AQLNE1rQ -1Dpk/nXqRgjkdeVh64sWB7AxLAO0DrsHAM0QPA1088OwDejv/6wIwHX4w79s -BLFbZQINuA0BZToNdArNFnT0mM0Wju9Hw1g6AEluc2VydCBkaXNrIDEuBw0A -AA== -==== -EOT - - # Get setup - setupsz=$(getlong $SetupSzOfs $bs) - setupszb=$(( $setupsz & 255 )) - dd if=$KERNEL bs=512 skip=1 count=$setupszb 2> /dev/null >> $bs - - if [ -n "$TRACKS" ]; then - [ -n "$DEBUG" ] && echo -n "--tracks " 1>&2 - n=$(getlong $CylinderCount $bs) - store16 $CylinderCount $(( ($n & -256) + $TRACKS )) $bs - fi - if [ -n "$FLAGS" ]; then - [ -n "$DEBUG" ] && echo -n "--flags " 1>&2 - store16 $FlagsOfs $FLAGS $bs - fi - if [ -n "$VIDEO" ]; then - [ -n "$DEBUG" ] && echo -n "--video " 1>&2 - store16 $VideoModeOfs $VIDEO $bs - fi - if [ -n "$RDEV" ]; then - if [ "$(dirname $RDEV)" == "/dev" -a -b $RDEV ]; then - [ -n "$DEBUG" ] && echo -n "--rdev " 1>&2 - RDEV=$(stat -c '0x%02t%02T' $RDEV 2> /dev/null) - store16 $RootDevOfs $RDEV $bs - fi - fi - - # Store cmdline after setup - if [ -n "$CMDLINE" ]; then - [ -n "$DEBUG" ] && echo -n "--cmdline '$CMDLINE' " 1>&2 - echo -n "$CMDLINE" | dd bs=512 count=1 conv=sync 2> /dev/null >> $bs - storelong $ArgPtrOfs $(( $SetupBase + $stacktop )) $bs - fi - - # Compute initramfs size - initrdlen=0 - for i in $( echo $INITRD | sed 's/,/ /' ); do - [ -s "$i" ] || continue - [ -n "$DEBUG" ] && echo "--initrd $i " 1>&2 - initrdlen=$(( ($initrdlen + $(stat -c %s $i) + 3) & -4 )) - done - if [ $initrdlen -ne 0 ]; then - [ -n "$DEBUG" ] && echo "initrdlen = $initrdlen " 1>&2 - storelong $RamfsAdrOfs \ - $(( (0x1000000 - $initrdlen) & 0xFFFF0000 )) $bs - storelong $RamfsLenOfs $initrdlen $bs - fi - - # Output boot sector + setup + cmdline - dd if=$bs 2> /dev/null - - # Output kernel code - dd if=$KERNEL bs=512 skip=$(( $setupszb + 1 )) 2> /dev/null - - # Pad to next sector - Kpad=$(( 512 - ($(stat -c %s $KERNEL) & 511) )) - [ $Kpad -eq 512 ] || dd if=/dev/zero bs=1 count=$Kpad 2> /dev/null - - # Output initramfs - padding=0 - for i in $( echo $INITRD | sed 's/,/ /' ); do - [ -s "$i" ] || continue - [ $padding -ne 0 ] && dd if=/dev/zero bs=1 count=$padding 2> /dev/null - dd if=$i 2> /dev/null - padding=$(( 4 - ($(stat -c %s $i) & 3) )) - [ $padding -eq 4 ] && padding=0 - done - - # Cleanup - rm -f $bs -} - -if [ "$FORMAT" == "0" ]; then # unsplitted - floppyset > $PREFIX - exit -fi -floppyset | split -b ${FORMAT}k /dev/stdin floppy$$ -i=1 -ls floppy$$* | while read file ; do - output=$PREFIX$(printf "%03d" $i) - cat $file /dev/zero | dd bs=1k count=$FORMAT conv=sync of=$output 2> /dev/null - echo $output - rm -f $file - i=$(( $i + 1 )) -done diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/index.php --- a/mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/index.php Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,440 +0,0 @@ - - - - - SliTaz Boot Floppies redirection - - - - - - - 1) - $cmd .= " skip=".($_GET['n']-1); - } - echo `$cmd 2> /dev/null`; - exit; -} -?> - - - - SliTaz Boot Floppies - - - - - - - - - - - - - - -EOT; -} - - $size = 0; - $initrd_size = 0; - - // Upload kernel - - foreach($_FILES as $data) { - $msg="The file ".$_FILES["kernel"]['name']." "; - switch ($data["error"]) { - case UPLOAD_ERR_INI_SIZE : - error($msg."exceeds upload_max_filesize."); - break; - case UPLOAD_ERR_FORM_SIZE : - error($msg."exceeds max_post_size."); - break; - case UPLOAD_ERR_PARTIAL : - error($msg."was only partially uploaded."); - break; - case UPLOAD_ERR_NO_TMP_DIR : - error("Missing a temporary folder."); - break; - case UPLOAD_ERR_CANT_WRITE : - error("Failed to write file to disk."); - break; - } - } - if (isset($_FILES["kernel"]['tmp_name']) && - is_uploaded_file($_FILES["kernel"]['tmp_name'])) { - $tmp_dir = tempnam('','fdbuild'); - if (file_exists($tmp_dir)) unlink($tmp_dir); - mkdir($tmp_dir); - $tmp_dir .= '/'; - move_uploaded_file($_FILES["kernel"]['tmp_name'], - $tmp_dir."kernel"); - $kernel = $tmp_dir."kernel"; - $boot_version = get_long($kernel,0x206) & 255; - $size = get_long($kernel,0x1F4); // syssize paragraphs - if ($boot_version < 4) $size &= 0xFFFF; // 16 bits before 2.4 - $size = ($size + 0xFFF) & 0xFFFF000; // round up to 64K - $size <<= 4; // paragraphs -> bytes - if (get_long($kernel,0x202) != 0x53726448 || // 'HdrS' magic - (get_long($kernel,0x211) & 1 != 1)) { // bzImage flag - error("The file ".$_FILES["kernel"]['name']. - " is not a bzImage Linux kernel."); - $size = 0; - } - else if ($boot_version < 2 && $_POST['cmdline']) { // before 2.2 - unset($_POST['cmdline']); - error("This boot loader does not support Linux kernel ". - "prior 2.4.0-test3-pre3 command line.", - "Warning"); - } - $msg = "The size of the file ".$_FILES["kernel"]['name']; - } - - // Upload initrd - - if ($size && isset($_FILES["initrd"]['tmp_name']) && - is_uploaded_file($_FILES["initrd"]['tmp_name'])) { - move_uploaded_file($_FILES["initrd"]['tmp_name'], - $tmp_dir."initrd"); - $initrd_size = $_FILES["initrd"]['size']; - $size += $initrd_size; - $msg = "The total size of the files ".$_FILES["kernel"]['name']. - " and ".$_FILES["initrd"]['name']; - } - if ($initrd_size && isset($_FILES["initrd2"]['tmp_name']) && - is_uploaded_file($_FILES["initrd2"]['tmp_name'])) { - move_uploaded_file($_FILES["initrd2"]['tmp_name'], - $tmp_dir."initrd2"); - $initrd2_size = $_FILES["initrd2"]['size']; - $size += $initrd2_size; - $msg = "The total size of the files ".$_FILES["kernel"]['name']. - ", ".$_FILES["initrd"]['name']. - " and ".$_FILES["initrd2"]['name']; - } - if ($size >= 15 * 1024 * 1024) { - error($msg." exceeds 15 MB."); - $size = 0; - } - if ($size == 0) { - if (isset($tmp_dir)) - system("rm -f $tmp_dir"); - } - else { - $cmd = "./bootloader ".$tmp_dir."kernel --prefix " - . $tmp_dir."fd --format 0 --flags ".$_POST['flags'] - . " --video ".$_POST['video']; - if ($_POST['cmdline']) - $cmd .= " --cmdline '".$_POST['cmdline']."'"; - if (file_exists($_POST['rdev'])) - $cmd .= " --rdev ".$_POST['rdev']; - if ($initrd_size) - $cmd .= " --initrd ".$tmp_dir."initrd"; - if ($initrd2_size) - $cmd .= " --initrd ".$tmp_dir."initrd2"; - switch ($_POST['size']) { - case 1763328 : - case 2015232 : - case 3526656 : - case 4030464 : - $cmd .= " --tracks 82"; break; - case 1784832 : - $cmd .= " --tracks 83"; break; - } - shell_exec($cmd); - $count = 1; - if ($_POST['size'] != 0) { - $count += (filesize($tmp_dir."fd") -1) / $_POST['size']; - $padding = $_POST['size'] - - (filesize($tmp_dir."fd") % $_POST['size']); - } - } - $sizes = array( - "368640" => "360 KB", "737280" => "720 KB", - "1228800" => "1.20 MB", - "1474560" => "1.44 MB", "1638400" => "1.60 MB", - "1720320" => "1.68 MB", "1763328" => "1.72 MB", - "1784832" => "1.74 MB", "1802240" => "1.76 MB", - "1884160" => "1.84 MB", "1966080" => "1.92 MB", - "2015232" => "1.96 MB", "2949120" => "2.88 MB", - "3440640" => "3.36 MB", "3526656" => "3.44 MB", - "3932160" => "3.84 MB", "4030464" => "3.92 MB", - "0" => "no limit" - ); - -function show_size($size) -{ - global $sizes; - if ($size != 0) return " ".$sizes[$size]; -} - if (!isset($count)) { -?> - - - - - - - - - -
-
-
-
- - -
- -

Boot

-

Floppy image set builder

- - -
"> - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux kernel: required
Initramfs / Initrd: optional
Extra initramfs: optional
Default cmdline:/> optional
Root device:" /> -   Root flags: -   VGA mode: -
Floppy size: - -
-
- -Note 1: $msg of files (kernel and initramfs) in memory. -

-

-Note 2: the extra initramfs may be useful to add your own configuration files. -

-EOT; - } - else { -?> - -

-You can write floppies with SliTaz bootfloppybox, -Windows rawrite or simply dd: -

-
# dd if=fd001.img of=/dev/fd0
-
- -

-Start your computer with fd001.img. It will show the kernel version string and -the kernel cmdline line. You can edit the cmdline. Most users can just press Enter. -

- -= 2) { -?> -

-The floppy is then loaded into memory (one dot each 64k) and you will be prompted to -insert the next floppy, fd002.img. And so on. -

- -

-The floppy set detects disk swaps and can be used without keyboard. -

- -

-Good luck. -

- - - -
-
-
-
-
- - -
-

-Copyright © SliTaz - -GNU General Public License -

- -
- - -
-

-Valid XHTML 1.0 -

-
- - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/floppies/index.html --- a/mirror-tools/stuff/var/www/slitaz/mirror/floppies/index.html Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ - - - - SliTaz Boot Floppies - - - - - - - - - - - - - - - -
-
-
-
- - -
- -

Boot

-

Floppy image set

- -

-This floppy set will boot a Slitaz stable version. You can write floppies -with SliTaz bootfloppybox, -Windows rawrite or simply dd: -

# dd if=fd001.img of=/dev/fd0
-
- -

-If you have a CD-ROM, an USB port and an USB key or a network card, but you -can't boot these devices directly, then try -floppy-grub4dos -first. This 1.44Mb floppy provides tiny programs to boot these devices without BIOS -support and some other tools. -

-

-You can start with one of the 3 following flavors : -

    -
  • - base needs 32Mb of RAM and 5 floppies: fd001.img to fd005.img.
    - base provides the minimum slitaz distribution subset in text mode. -
  • -
  • - justx needs 96M of RAM and 11 floppies: fd001.img to fd105.img.
    - justx provides the minimum slitaz distribution subset with X11 support. -
  • -
  • - core needs 160M of RAM and 22 floppies: fd001.img to fd210.img.
    - core provides the default slitaz distribution. -
  • -
- -Start your computer with fd001.img. It will show the kernel version string and -the kernel cmdline line. You can edit the cmdline. Most users can just press Enter. - -

-The floppy is then loaded into memory (one dot each 64k) and you will be prompted to -insert the next floppy, fd002.img. And so on up to fd005.img. -

-

-The base flavor will then start and you will be prompted to insert extra floppies -for justx and core flavors. You can bypass this by using Q and Enter. -

-

-Each floppy set detects disk swaps and can be used without a keyboard. -

-

-Good luck. -

- - -
-
-
-
-
- - -
-

-Copyright © SliTaz - -GNU General Public License -

- -
- - -
-

-Valid XHTML 1.0 -

-
- - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/floppies/loram/index.html --- a/mirror-tools/stuff/var/www/slitaz/mirror/floppies/loram/index.html Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ - - - - SliTaz Boot Floppies - - - - - - - - - - - - - - - -
-
-
-
- - -
- -

Boot

-

Floppy image set

- -

-This floppy set will boot a Slitaz stable loram version. You can write floppies -with SliTaz bootfloppybox, -Windows rawrite or simply dd: -

# dd if=fd001.img of=/dev/fd0
-
- -

-If you have a CD-ROM, an USB port and an USB key or a network card, but you -can't boot these devices directly, then try -floppy-grub4dos -first. This 1.44Mb floppy provides tiny programs to boot these devices without BIOS -support and some other tools. -

-

-You can start with one of the 3 following flavors : -

    -
  • - base needs 22Mb of RAM and 7 floppies: fd001.img to fd103.img.
    - base provides the minimum slitaz distribution subset in text mode. -
  • -
  • - justx needs 64M of RAM and 14 floppies: fd001.img to fd206.img.
    - justx provides the minimum slitaz distribution subset with X11 support. -
  • -
  • - core needs 92M of RAM and 26 floppies: fd001.img to fd311.img.
    - core provides the default slitaz distribution. -
  • -
- -Start your computer with fd001.img. It will show the kernel version string and -the kernel cmdline line. You can edit the cmdline. Most users can just press Enter. - -

-The floppy is then loaded into memory (one dot each 64k) and you will be prompted to -insert the next floppy, fd002.img. And so on up to fd003.img. -

-

-The loram bootstrap will then start and you will be prompted to insert extra floppies -for base, justx and core flavors. You can bypass this by using Q and Enter. -

-

-Each floppy set detects disk swaps and can be used without a keyboard. -

-

-Good luck. -

- - -
-
-
-
-
- - -
-

-Copyright © SliTaz - -GNU General Public License -

- -
- - -
-

-Valid XHTML 1.0 -

-
- - - diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/mirrors --- a/mirror-tools/stuff/var/www/slitaz/mirror/mirrors Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -http://mirror.slitaz.org/ -http://mirror.switch.ch/ftp/mirror/slitaz/ -http://www.gtlib.gatech.edu/pub/slitaz/ -http://download.tuxfamily.org/slitaz/ -http://mirror.lupaworld.com/slitaz/ -http://slitaz.c3sl.ufpr.br/ -ftp://ftp.pina.si/slitaz/ -http://distro.ibiblio.org/pub/linux/distributions/slitaz/ -http://ftp.ch.xemacs.org/ftp/pool/2/mirror/slitaz/ -http://slitaz.mirror.garr.it/mirrors/slitaz/ diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/pxe/defaults.cfg --- a/mirror-tools/stuff/var/www/slitaz/mirror/pxe/defaults.cfg Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -default menu.c32 -prompt 0 - -MENU TITLE Slitaz Web boot http://www.slitaz.org/ -ALLOWOPTIONS 0 -MENU MARGIN 0 -MENU ROWS 17 -MENU COLOR BORDER 37;44 #40000000 #00000000 std -MENU COLOR TITLE 1;33;44 #c00090f0 #00000000 std -MENU COLOR SCROLLBAR 37;44 #40000000 #00000000 std - -#MENU COLOR TIMEOUT_MSG 1;33;44 #c00090f0 #00000000 std -#MENU COLOR TIMEOUT 37;40 #80ffffff #00000000 std -MENU TIMEOUTROW 25 -MENU AUTOBOOT Start cooking in # second{,s} -timeout 100 -TOTALTIMEOUT 9000 diff -r bf6db9997f47 -r b5a5fbb61181 mirror-tools/stuff/var/www/slitaz/mirror/pxe/mkcfg.sh --- a/mirror-tools/stuff/var/www/slitaz/mirror/pxe/mkcfg.sh Fri Feb 25 00:13:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -#!/bin/sh - -#usage: -# copy /boot/isolinux/* -# remove *.cfg -# copy then update /boot/isolinux/isolinux.cfg core.cfg - -cd $(dirname $0) - -# Status functions. -status() -{ - local CHECK=$? - echo -en "\\033[70G[ " - if [ $CHECK = 0 ]; then - echo -en "\\033[1;33mOK" - else - echo -en "\\033[1;31mFailed" - fi - echo -e "\\033[0;39m ]" -} - -directlinks() -{ - mkdir $1/$2 - ln -s .. $1/$2/$1 - ln -s ../$2.cfg $1/$2/default - ln -s ../../pxelinux.0 $1/$2/pxelinux.0 - ln -s . $1/$2/pxelinux.cfg - [ -e $1/boot ] || ln -s ../../boot $1/boot -} -for version in cooking $(ls ../boot | grep 0$) ; do - -[ "$version" = "1.0" ] && continue -echo -n "Building $version" -for i in splash.lss isolinux.msg core.cfg ; do - [ -s $version/$i ] && continue - echo -n " $version/$i not found !" - false - status - continue 2 -done -if ! grep -q $version/splash.lss $version/isolinux.msg ; then - echo "WARNING: please update $version/isolinux.msg with $version/splash.lss" -fi -rm -f $version/*-*.cfg -( cd ../boot/$version ; ls rootfs-*.gz 2> /dev/null ) | \ -sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do - lowcased=$(echo $flavor | tr [A-Z] [a-z]) - if [ "$lowcased" != "$flavor" ]; then - echo "" - echo "Warning : renaming ../boot/$version/rootfs-$flavor.gz to ../boot/$version/rootfs-$lowcased.gz" - mv ../boot/$version/rootfs-$flavor.gz ../boot/$version/rootfs-$lowcased.gz - flavor=$lowcased - fi - [ -f $version/$flavor.cfg ] && continue - cp $version/core.cfg $version/$flavor.cfg - sed -i -e "s/core-common/$flavor-common/" \ - -e "s/^label slitaz$/say Using $flavor flavor.\nlabel slitaz/" \ - -e "s/rootfs.gz/rootfs-$flavor.gz/" $version/$flavor.cfg - directlinks $version $flavor -done -for flavor in $(cd $version ; ls *.cfg | sed 's/.cfg//') ; do - echo -n " $flavor" - cat > $version/$flavor-common.cfg < $version/$flavor-$cfg.cfg - cat >> $version/$flavor-common.cfg < /dev/null ) | \ -sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do - [ -f 1.0/$flavor.cfg ] && continue - cp 1.0/core.cfg 1.0/$flavor.cfg - sed -i -e "s/core-common/$flavor-common/" \ - -e "s/rootfs.gz/rootfs-$flavor.gz/" 1.0/$flavor.cfg - directlinks 1.0 $flavor -done -directlinks 1.0 core -for flavor in $(cd 1.0; ls *.cfg | sed 's/.cfg//') ; do - echo -n " $flavor" - cat > 1.0/$flavor-common.cfg < 1.0/$flavor-$cfg.cfg - cat >> 1.0/$flavor-common.cfg <