slitaz-modular rev 30

Added local-mirror script to initramfs so its on all isos. Livecd/dvd will be added to union if /boot/packages exist on iso. Use fstab_clean so you can mount devices with pcmanfm.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Feb 27 01:55:47 2011 +0000 (2011-02-27)
parents 72d2798193ef
children e97122839ed8
files initramfs/etc/lighttpd/common.conf initramfs/etc/lighttpd/vhosts-local.conf initramfs/etc/lighttpd/vhosts-tank.conf initramfs/etc/local-mirror.conf initramfs/initramfs.list initramfs/linuxrc initramfs/usr/bin/local-mirror
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/initramfs/etc/lighttpd/common.conf	Sun Feb 27 01:55:47 2011 +0000
     1.3 @@ -0,0 +1,3 @@
     1.4 +
     1.5 +var.basedir = "/home/slitaz/www/"
     1.6 +var.logdir = "/var/log/lighttpd/"
     1.7 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/initramfs/etc/lighttpd/vhosts-local.conf	Sun Feb 27 01:55:47 2011 +0000
     2.3 @@ -0,0 +1,215 @@
     2.4 +# /etc/lighttpd/vhosts.conf : Virtual hosts configuration file.
     2.5 +#
     2.6 +
     2.7 +# Nice url's for Drupal
     2.8 +#
     2.9 +#url.rewrite-final = (
    2.10 +#  "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
    2.11 +#  "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
    2.12 +#  "^/([^.?]*)$" => "/index.php?q=$1",
    2.13 +#   "^/rss.xml" => "/index.php?q=rss.xml"
    2.14 +#  )
    2.15 +
    2.16 +include "common.conf"
    2.17 +
    2.18 +# tank.slitaz.org (Server canonical hostname)
    2.19 +#
    2.20 +$HTTP["host"] =~ "tank\.slitaz\.org$" {
    2.21 +  server.name = "tank"
    2.22 +  server.document-root = basedir + server.name
    2.23 +  server.errorlog = logdir + "localhost-tank-error.log"
    2.24 +  accesslog.filename = logdir + "localhost-tank-access.log"
    2.25 +  include "awstats.conf"
    2.26 +  index-file.names += ( "index.php" )
    2.27 +}
    2.28 +
    2.29 +# slitaz.org
    2.30 +#
    2.31 +$HTTP["host"] =~ "(^|www\.)slitaz\.org$" {
    2.32 +  server.name = "website"
    2.33 +  server.document-root = basedir + server.name
    2.34 +  server.errorlog = logdir + "slitaz.org-error.log"
    2.35 +  accesslog.filename = logdir + "slitaz.org-access.log"
    2.36 +  
    2.37 +  include "awstats.conf"
    2.38 +  index-file.names += ( "index.php" )
    2.39 +  index-file.names += ( "index.html" )
    2.40 +  
    2.41 +  url.rewrite-once = (
    2.42 +    "^/about" => "/fr/about",
    2.43 +	"^/artwork" => "/fr/artwork",
    2.44 +	"^/devel" => "/fr/devel",
    2.45 +    "^/doc" => "/fr/doc",
    2.46 +	"^/get" => "/fr/get",
    2.47 +	"^/packages" => "/fr/packages"
    2.48 +  )
    2.49 + 
    2.50 +}
    2.51 +
    2.52 +# pro.slitaz.org
    2.53 +#
    2.54 +$HTTP["host"] =~ "pro\.slitaz\.org$" {
    2.55 +  server.name = "pro"
    2.56 +  server.document-root = basedir + server.name
    2.57 +  server.errorlog = logdir + "pro.slitaz.org-error.log"
    2.58 +  accesslog.filename = logdir + "pro.slitaz.org-access.log"
    2.59 +  url.rewrite-final = (
    2.60 +    "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
    2.61 +    "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
    2.62 +    "^/([^.?]*)$" => "/index.php?q=$1",
    2.63 +    "^/rss.xml" => "/index.php?q=rss.xml"
    2.64 +  )
    2.65 +}
    2.66 +
    2.67 +# people.slitaz.org
    2.68 +#
    2.69 +$HTTP["host"] =~ "people\.slitaz\.org$" {
    2.70 +  server.name = "people"
    2.71 +  userdir.path = "Public"
    2.72 +  userdir.exclude-user = ("root")
    2.73 +  server.document-root = basedir + server.name
    2.74 +  server.errorlog = logdir + "people.slitaz.org-error.log"
    2.75 +  accesslog.filename = logdir + "people.slitaz.org-access.log"
    2.76 +}
    2.77 +
    2.78 +# boot.slitaz.org
    2.79 +#
    2.80 +$HTTP["host"] =~ "boot\.slitaz\.org$" {
    2.81 +  server.name = "boot"
    2.82 +  server.document-root = basedir + server.name
    2.83 +  server.errorlog = logdir + "boot.slitaz.org-error.log"
    2.84 +  accesslog.filename = logdir + "boot.slitaz.org-access.log"
    2.85 +}
    2.86 +
    2.87 +# pkgs.slitaz.org
    2.88 +#
    2.89 +$HTTP["host"] =~ "pkgs\.slitaz\.org$" {
    2.90 +  server.name = "pkgs"
    2.91 +  server.document-root = basedir + server.name
    2.92 +  server.errorlog = logdir + "pkgs.slitaz.org-error.log"
    2.93 +  accesslog.filename = logdir + "pkgs.slitaz.org-access.log"
    2.94 +  cgi.assign = (
    2.95 +    ".cgi" => "/bin/sh"
    2.96 +  )
    2.97 +}
    2.98 +
    2.99 +# bb.slitaz.org (Build Bot)
   2.100 +#
   2.101 +$HTTP["host"] =~ "bb\.slitaz\.org$" {
   2.102 +  server.name = "bb"
   2.103 +  server.document-root = basedir + server.name
   2.104 +  server.errorlog = logdir + "bb.slitaz.org-error.log"
   2.105 +  accesslog.filename = logdir + "bb.slitaz.org-access.log"
   2.106 +}
   2.107 +
   2.108 +# hg.slitaz.org (Mercurial repos)
   2.109 +#
   2.110 +$HTTP["host"] =~ "hg\.slitaz\.org$" {
   2.111 +  cgi.assign = (
   2.112 +    ".cgi" => "/usr/bin/python"
   2.113 +  )
   2.114 +  server.name = "hg"
   2.115 +  server.document-root = basedir + server.name
   2.116 +  url.rewrite-once = ( "(.*)" => "/hgwebdir.cgi$1" )
   2.117 +}
   2.118 +
   2.119 +# repos.slitaz.org (Mercurial repos with auth and write access)
   2.120 +#
   2.121 +$HTTP["host"] =~ "repos\.slitaz\.org" {
   2.122 +  cgi.assign = (
   2.123 +    ".cgi" => "/usr/bin/python"
   2.124 +  )
   2.125 +  server.name = "hg"
   2.126 +  server.document-root = basedir + server.name
   2.127 +  url.rewrite-once = ( "(.*)" => "/hgwebdir.cgi$1" )
   2.128 +  auth.backend = "plain"
   2.129 +  auth.backend.plain.userfile = "/etc/lighttpd/plain.passwd"
   2.130 +  auth.require = ( "/" =>
   2.131 +    (
   2.132 +    "method" => "basic",
   2.133 +    "realm" => "SliTaz Mercurial repositories protected area",
   2.134 +    "require" => "valid-user"
   2.135 +    )
   2.136 +  )
   2.137 +
   2.138 +}
   2.139 +
   2.140 +# doc.slitaz.org
   2.141 +#
   2.142 +$HTTP["host"] =~ "doc\.slitaz\.org" {
   2.143 +  server.name = "doc"
   2.144 +  server.document-root = basedir + server.name
   2.145 +  index-file.names = ("doku.php") 
   2.146 +  var.dokudir = ""
   2.147 +   # Rewrites for dokuwiki
   2.148 +    url.rewrite = (
   2.149 +      "^" + var.dokudir + "/lib/.*$"              => "$0",
   2.150 +      "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
   2.151 +      "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
   2.152 +      "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
   2.153 +      "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
   2.154 +      "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
   2.155 +      "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
   2.156 +      "^" + var.dokudir + "/doku.php.*"           => "$0",
   2.157 +      "^" + var.dokudir + "/feed.php.*"           => "$0",
   2.158 +      "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
   2.159 +      "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
   2.160 +    )
   2.161 +}
   2.162 +
   2.163 +
   2.164 +# mirror.slitaz.org (Server canonical hostname)
   2.165 +#
   2.166 +$HTTP["host"] =~ "^mirror([0-9]*)\.slitaz\.org$" {
   2.167 +  server.document-root = "/home/slitaz/www/slitaz/mirror"
   2.168 +  server.errorlog = "/var/log/lighttpd/mirror.slitaz.org-error.log"
   2.169 +  accesslog.filename = "/var/log/lighttpd/mirror.slitaz.org-access.log"
   2.170 +  
   2.171 +  include "awstats.conf"
   2.172 +  
   2.173 +  alias.url += ( "/info" => "/home/slitaz/www/mirror-info/" )
   2.174 +  
   2.175 +  alias.url += ( "/pizza" => "/home/slitaz/www/pizza/" )
   2.176 +  
   2.177 +  alias.url += ( "/doc" => "/home/slitaz/www/doc/" )
   2.178 +  var.dokudir = "/doc"
   2.179 +  # Rewrites for dokuwiki
   2.180 +  url.rewrite = (
   2.181 +    "^" + var.dokudir + "/lib/.*$"              => "$0",
   2.182 +     "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
   2.183 +     "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
   2.184 +     "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
   2.185 +     "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
   2.186 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
   2.187 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
   2.188 +     "^" + var.dokudir + "/doku.php.*"           => "$0",
   2.189 +     "^" + var.dokudir + "/feed.php.*"           => "$0",
   2.190 +     "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
   2.191 +     "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
   2.192 +  )
   2.193 +
   2.194 +  alias.url += ( "/webboot" => "/home/slitaz/www/boot/" )
   2.195 +
   2.196 +  alias.url += ( "/pkgs" => "/home/slitaz/www/pkgs/" )
   2.197 +  index-file.names += ( "search.sh" )
   2.198 +  cgi.assign += (
   2.199 +    ".sh" => "/bin/sh"
   2.200 +  )
   2.201 +
   2.202 +  alias.url += ( "/hg" => "/home/slitaz/www/hg/" )
   2.203 +###  url.rewrite-once = ( "/hg(.*)" => "/hg/hgwebdir.py$1" )
   2.204 +  index-file.names += ( "hgwebdir.py" )
   2.205 +  cgi.assign += (
   2.206 +    ".py" => "/usr/bin/python"
   2.207 +  )
   2.208 +
   2.209 +  alias.url += ( "/www" => "/home/slitaz/www/website" )
   2.210 +  
   2.211 +#  alias.url += ( "/tiny" => "/var/www/pizza/tiny/demos/192.168.0.6/var/www" )
   2.212 +#  index-file.names += ( "index.sh" )
   2.213 +  
   2.214 +  index-file.names += ( "index.html" )
   2.215 +  index-file.names += ( "index.php" )
   2.216 +  # Last but not least...
   2.217 +  index-file.names += ( "/dir-generator.php" )
   2.218 +}
   2.219 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/initramfs/etc/lighttpd/vhosts-tank.conf	Sun Feb 27 01:55:47 2011 +0000
     3.3 @@ -0,0 +1,209 @@
     3.4 +# /etc/lighttpd/vhosts.conf : Virtual hosts configuration file.
     3.5 +#
     3.6 +
     3.7 +# Nice url's for Drupal
     3.8 +#
     3.9 +#url.rewrite-final = (
    3.10 +#  "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
    3.11 +#  "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
    3.12 +#  "^/([^.?]*)$" => "/index.php?q=$1",
    3.13 +#   "^/rss.xml" => "/index.php?q=rss.xml"
    3.14 +#  )
    3.15 +
    3.16 +# tank.slitaz.org (Server canonical hostname)
    3.17 +#
    3.18 +$HTTP["host"] =~ "tank\.slitaz\.org$" {
    3.19 +  server.document-root = "/home/slitaz/www/tank"
    3.20 +  server.errorlog = "/var/log/lighttpd/tank.slitaz.org-error.log"
    3.21 +  accesslog.filename = "/var/log/lighttpd/tank.slitaz.org-access.log"
    3.22 +  include "awstats.conf"
    3.23 +  index-file.names += ( "index.php" )
    3.24 +}
    3.25 +
    3.26 +# slitaz.org
    3.27 +#
    3.28 +$HTTP["host"] =~ "(^|www\.)slitaz\.org$" {
    3.29 +  server.document-root = "/home/slitaz/www/website"
    3.30 +  server.errorlog = "/var/log/lighttpd/slitaz.org-error.log"
    3.31 +  accesslog.filename = "/var/log/lighttpd/slitaz.org-access.log"
    3.32 +  
    3.33 +  include "awstats.conf"
    3.34 +  index-file.names += ( "index.php" )
    3.35 +  index-file.names += ( "index.html" )
    3.36 +  
    3.37 +  url.rewrite-once = (
    3.38 +    "^/about" => "/fr/about",
    3.39 +	"^/artwork" => "/fr/artwork",
    3.40 +	"^/devel" => "/fr/devel",
    3.41 +    "^/doc" => "/fr/doc",
    3.42 +	"^/get" => "/fr/get",
    3.43 +	"^/packages" => "/fr/packages"
    3.44 +  )
    3.45 + 
    3.46 +}
    3.47 +
    3.48 +# pro.slitaz.org
    3.49 +#
    3.50 +$HTTP["host"] =~ "pro\.slitaz\.org$" {
    3.51 +  server.document-root = "/home/slitaz/www/pro"
    3.52 +  server.errorlog = "/var/log/lighttpd/pro.slitaz.org-error.log"
    3.53 +  accesslog.filename = "/var/log/lighttpd/pro.slitaz.org-access.log"
    3.54 +  url.rewrite-final = (
    3.55 +    "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
    3.56 +    "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
    3.57 +    "^/([^.?]*)$" => "/index.php?q=$1",
    3.58 +    "^/rss.xml" => "/index.php?q=rss.xml"
    3.59 +  )
    3.60 +}
    3.61 +
    3.62 +# people.slitaz.org
    3.63 +#
    3.64 +$HTTP["host"] =~ "people\.slitaz\.org$" {
    3.65 +  userdir.path = "Public"
    3.66 +  userdir.exclude-user = ("root")
    3.67 +  server.document-root = "/home/slitaz/www/people"
    3.68 +  server.errorlog = "/var/log/lighttpd/people.slitaz.org-error.log"
    3.69 +  accesslog.filename = "/var/log/lighttpd/people.slitaz.org-access.log"
    3.70 +}
    3.71 +
    3.72 +# boot.slitaz.org
    3.73 +#
    3.74 +$HTTP["host"] =~ "boot\.slitaz\.org$" {
    3.75 +  server.document-root = "/home/slitaz/www/boot"
    3.76 +  server.errorlog = "/var/log/lighttpd/boot.slitaz.org-error.log"
    3.77 +  accesslog.filename = "/var/log/lighttpd/boot.slitaz.org-access.log"
    3.78 +}
    3.79 +
    3.80 +# pkgs.slitaz.org
    3.81 +#
    3.82 +$HTTP["host"] =~ "pkgs\.slitaz\.org$" {
    3.83 +  server.document-root = "/home/slitaz/www/pkgs"
    3.84 +  server.errorlog = "/var/log/lighttpd/pkgs.slitaz.org-error.log"
    3.85 +  accesslog.filename = "/var/log/lighttpd/pkgs.slitaz.org-access.log"
    3.86 +  cgi.assign = (
    3.87 +    ".cgi" => "/bin/sh"
    3.88 +  )
    3.89 +}
    3.90 +
    3.91 +# bb.slitaz.org (Build Bot)
    3.92 +#
    3.93 +$HTTP["host"] =~ "bb\.slitaz\.org$" {
    3.94 +  server.document-root = "/home/slitaz/www/bb"
    3.95 +  server.errorlog = "/var/log/lighttpd/bb.slitaz.org-error.log"
    3.96 +  accesslog.filename = "/var/log/lighttpd/bb.slitaz.org-access.log"
    3.97 +}
    3.98 +
    3.99 +# hg.slitaz.org (Mercurial repos)
   3.100 +#
   3.101 +$HTTP["host"] =~ "hg\.slitaz\.org" {
   3.102 +  cgi.assign = (
   3.103 +    ".cgi" => "/usr/bin/python"
   3.104 +  )
   3.105 +  server.document-root = "/home/slitaz/www/hg"
   3.106 +  url.rewrite-once = ( "(.*)" => "/hgwebdir.cgi$1" )
   3.107 +}
   3.108 +
   3.109 +# repos.slitaz.org (Mercurial repos with auth and write access)
   3.110 +#
   3.111 +$HTTP["host"] =~ "repos\.slitaz\.org" {
   3.112 +  cgi.assign = (
   3.113 +    ".cgi" => "/usr/bin/python"
   3.114 +  )
   3.115 +  server.document-root = "/home/slitaz/www/hg"
   3.116 +  url.rewrite-once = ( "(.*)" => "/hgwebdir.cgi$1" )
   3.117 +  auth.backend = "plain"
   3.118 +  auth.backend.plain.userfile = "/etc/lighttpd/plain.passwd"
   3.119 +  auth.require = ( "/" =>
   3.120 +    (
   3.121 +    "method" => "basic",
   3.122 +    "realm" => "SliTaz Mercurial repositories protected area",
   3.123 +    "require" => "valid-user"
   3.124 +    )
   3.125 +  )
   3.126 +
   3.127 +}
   3.128 +
   3.129 +# doc.slitaz.org
   3.130 +#
   3.131 +$HTTP["host"] =~ "doc\.slitaz\.org" {
   3.132 +  server.document-root = "/home/slitaz/www/doc"
   3.133 +  index-file.names = ("doku.php") 
   3.134 +  var.dokudir = ""
   3.135 +   # Rewrites for dokuwiki
   3.136 +    url.rewrite = (
   3.137 +      "^" + var.dokudir + "/lib/.*$"              => "$0",
   3.138 +      "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
   3.139 +      "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
   3.140 +      "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
   3.141 +      "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
   3.142 +      "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
   3.143 +      "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
   3.144 +      "^" + var.dokudir + "/doku.php.*"           => "$0",
   3.145 +      "^" + var.dokudir + "/feed.php.*"           => "$0",
   3.146 +      "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
   3.147 +      "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
   3.148 +    )
   3.149 +}
   3.150 +
   3.151 +# scn.slitaz.org
   3.152 +#
   3.153 +$HTTP["host"] =~ "scn\.slitaz\.org$" {
   3.154 +  server.document-root = "/home/slitaz/www/scn"
   3.155 +  server.errorlog = "/var/log/lighttpd/scn.slitaz.org-error.log"
   3.156 +  accesslog.filename = "/var/log/lighttpd/scn.slitaz.org-access.log"
   3.157 +  url.rewrite-final = (
   3.158 +    "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
   3.159 +    "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
   3.160 +    "^/([^.?]*)$" => "/index.php?q=$1",
   3.161 +    "^/rss.xml" => "/index.php?q=rss.xml"
   3.162 +  )
   3.163 +}
   3.164 +
   3.165 +# store.slitaz.org
   3.166 +#
   3.167 +$HTTP["host"] =~ "store\.slitaz\.org$" {
   3.168 +  server.document-root = "/home/slitaz/www/store"
   3.169 +  server.errorlog = "/var/log/lighttpd/store.slitaz.org-error.log"
   3.170 +  accesslog.filename = "/var/log/lighttpd/store.slitaz.org-access.log"
   3.171 +}
   3.172 +
   3.173 +# groups.slitaz.org
   3.174 +#
   3.175 +$HTTP["host"] =~ "groups\.slitaz\.org$" {
   3.176 +  server.document-root = "/home/slitaz/www/groups"
   3.177 +  server.errorlog = "/var/log/lighttpd/groups.slitaz.org-error.log"
   3.178 +  accesslog.filename = "/var/log/lighttpd/groups.slitaz.org-access.log"
   3.179 +  url.rewrite-final = (
   3.180 +    "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
   3.181 +    "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
   3.182 +    "^/([^.?]*)$" => "/index.php?q=$1",
   3.183 +    "^/rss.xml" => "/index.php?q=rss.xml"
   3.184 +  )
   3.185 +}
   3.186 +
   3.187 +# These hosts are personnal website for me and my family, pankso.
   3.188 +
   3.189 +
   3.190 +# libordux
   3.191 +#
   3.192 +$HTTP["host"] =~ "(^|\.)libordux\.$" {
   3.193 +  server.document-root = "/home/pankso/vhosts/libordux"
   3.194 +  server.errorlog = "/var/log/lighttpd/libordux.error.log"
   3.195 +  accesslog.filename = "/var/log/lighttpd/libordux.access.log"
   3.196 +}
   3.197 +
   3.198 +# lincolm.ch
   3.199 +#
   3.200 +$HTTP["host"] =~ "(^|\.)lincolm\.ch$" {
   3.201 +  server.document-root = "/home/pankso/vhosts/lincolm"
   3.202 +  server.errorlog = "/var/log/lighttpd/lincolm-error.log"
   3.203 +  accesslog.filename = "/var/log/lighttpd/lincolm-access.log"
   3.204 +}
   3.205 +
   3.206 +# solufina.ch
   3.207 +#
   3.208 +$HTTP["host"] =~ "(^|\.)solufina\.ch$" {
   3.209 +  server.document-root = "/home/pankso/vhosts/solufina"
   3.210 +  server.errorlog = "/var/log/lighttpd/solufina.log"
   3.211 +  accesslog.filename = "/var/log/lighttpd/solufina.log"
   3.212 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/initramfs/etc/local-mirror.conf	Sun Feb 27 01:55:47 2011 +0000
     4.3 @@ -0,0 +1,14 @@
     4.4 +REPOS="flavors flavors-stable slitaz-base-files \
     4.5 + slitaz-boot-scripts slitaz-dev-tools slitaz-configs slitaz-doc slitaz-forge \
     4.6 + slitaz-pizza slitaz-tools tank tazlito tazpkg tazusb \
     4.7 + tazwok slitaz-dev-tools website wok wok-stable wok-tiny \
     4.8 + wok-undigest"
     4.9 +WWW="tank hg mirror pkgs bb doc website people"
    4.10 +BASE_IP="127.0.0"
    4.11 +END_IP="1"
    4.12 +ADDRESS="www.slitaz.org mirror.slitaz.org tank.slitaz.org doc.slitaz.org pkgs.slitaz.org hg.slitaz.org bb.slitaz.org people.slitaz.org"
    4.13 +VHOST_FILE="/etc/lighttpd/vhosts-local.conf"
    4.14 +REPOS_DIR="/home/slitaz/repos"
    4.15 +WWW_DIR="/home/slitaz/www"
    4.16 +STABLE="/home/slitaz/stable"
    4.17 +COOKING="/home/slitaz/cooking"
    4.18 \ No newline at end of file
     5.1 --- a/initramfs/initramfs.list	Sat Feb 26 06:31:16 2011 +0000
     5.2 +++ b/initramfs/initramfs.list	Sun Feb 27 01:55:47 2011 +0000
     5.3 @@ -10,3 +10,4 @@
     5.4  aufs
     5.5  module-init-tools
     5.6  util-linux-ng-blkid
     5.7 +udev
     5.8 \ No newline at end of file
     6.1 --- a/initramfs/linuxrc	Sat Feb 26 06:31:16 2011 +0000
     6.2 +++ b/initramfs/linuxrc	Sun Feb 27 01:55:47 2011 +0000
     6.3 @@ -219,26 +219,6 @@
     6.4  
     6.5  debug_shell
     6.6  
     6.7 -#if [ $(cmdline_parameter copy) ]; then
     6.8 -#	echolog "Copying initramfs to union. Please wait..."
     6.9 -#	# copy busybox to union
    6.10 -#	for i in $(ls -a /); do
    6.11 -#		case "$i" in
    6.12 -#		.|..)	;;
    6.13 -#		memory|union)	;;
    6.14 -#		mnt)	mkdir -p $UNION/mnt ;;
    6.15 -#		sys)	mkdir -p $UNION/sys ;;
    6.16 -#		proc)	mkdir -p $UNION/proc ;;
    6.17 -#		dev)	;;
    6.18 -#		*)	if ! cp -af /$i $UNION 2> /dev/null; then
    6.19 -#				debug_shell
    6.20 -#			fi ;;
    6.21 -#		esac
    6.22 -#	done
    6.23 -#fi
    6.24 -
    6.25 -#debug_shell
    6.26 -
    6.27  # DATA contains path to the base directory of all fs modules which need
    6.28  # to be mounted and inserted into live filesystem. Do it now.
    6.29  echolog "Loading modules:"
    6.30 @@ -277,8 +257,8 @@
    6.31  echolog "Recreating /etc/fstab and /mnt directories"
    6.32  touch $UNION/etc/fstab
    6.33  rmdir $UNION/mnt/* 2>/dev/null
    6.34 -fstab_update $UNION
    6.35 -#fstab_clean $UNION
    6.36 +#fstab_update $UNION
    6.37 +fstab_clean $UNION
    6.38  
    6.39  # everything is ready now, so we may unload unused kernel modules
    6.40  # and do some cleanup, unmount few things which are no longer needed.
    6.41 @@ -298,6 +278,10 @@
    6.42  # Boot will contain whatever was in ./boot directory in the bootable media
    6.43  # Error output goes to null, as nothing is mounted with copy2ram
    6.44  #mount -n -o rbind $(dirname $DATA)/boot $UNION/boot 2>/dev/null
    6.45 +if [ -d $(dirname $DATA)/boot/packages ]; then
    6.46 +	echolog "Setup repo for mirror iso..."
    6.47 +	mount -n -o remount,add:1:/$(dirname $DATA)=ro aufs $UNION
    6.48 +fi
    6.49  
    6.50  # Union contains all the files and directories unioned from all modules.
    6.51  # Change root directory to it, and move initrd's root to /mnt/live/initramdisk
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/initramfs/usr/bin/local-mirror	Sun Feb 27 01:55:47 2011 +0000
     7.3 @@ -0,0 +1,140 @@
     7.4 +#!/bin/sh
     7.5 +
     7.6 +. /etc/local-mirror.conf
     7.7 +
     7.8 +[ -d $REPOS_DIR ] || continue
     7.9 +[ -d $WWW_DIR ] || mkdir -p $WWW_DIR
    7.10 +ln -sf /home/slitaz/www /var/www/vhosts
    7.11 +for b in $WWW; do
    7.12 +    [ -d $WWW_DIR/$b ] && continue
    7.13 +    if [ "$b" = "website" ]; then
    7.14 +		[ -d $REPOS_DIR/$b ] && ln -s $REPOS_DIR/$b $WWW_DIR
    7.15 +	fi
    7.16 +	if [ "$b" = "people" ]; then
    7.17 +		[ -d $REPOS_DIR/slitaz-forge/people ] && ln -sf $REPOS_DIR/slitaz-forge/people $WWW_DIR
    7.18 +	fi
    7.19 +	if [ "$b" = "doc" ]; then
    7.20 +		[ -d $REPOS_DIR/slitaz-forge/doc ] && ln -sf $REPOS_DIR/slitaz-forge/doc $WWW_DIR
    7.21 +		[ -d /var/www/dokuwiki ] && cp -a /var/www/dokuwiki/* $REPOS_DIR/slitaz-forge/doc
    7.22 +		chown root.root -R $REPOS_DIR/slitaz-forge/doc
    7.23 +		chmod 777 -R $REPOS_DIR/slitaz-forge/doc
    7.24 +	fi
    7.25 +	if [ "$b" = "bb" ]; then
    7.26 +		[ -d /usr/share/slitaz/web-bb ] && cp -a /usr/share/slitaz/web-bb $WWW_DIR/bb
    7.27 +		[ -d /usr/share/slitaz/web ] && cp -a /usr/share/slitaz/web $WWW_DIR/bb/web
    7.28 +		[ -d $REPOS_DIR/website/pics ] && ln -sf $REPOS_DIR/website/pics $WWW_DIR/bb/pics
    7.29 +	fi
    7.30 +	if [ "$b" = "pkgs" ]; then
    7.31 +		[ -d $wWW_DIR/pkgs ] || mkdir -p $WWW_DIR/pkgs
    7.32 +		[ -d /var/lib/tazpkg-web/style ] && cp -a /var/lib/tazpkg-web/style/* $WWW_DIR/pkgs
    7.33 +		[ -f /var/lib/tazpkg-web/search.cgi ] && cp -a /var/lib/tazpkg-web/search.cgi $WWW_DIR/pkgs
    7.34 +		[ -d $COOKING ] || mkdir -p $COOKING
    7.35 +		[ -d $STABLE ] || mkdir -p $STABLE
    7.36 +		[ -d $COOKING/wok ] || ln -sf $REPOS_DIR/wok $COOKING/clean-wok
    7.37 +		[ -d $STABLE/wok ] || ln -sf $REPOS_DIR/wok-stable $STABLE/clean-wok
    7.38 +		[ -d /boot/packages ] && ln -sf /boot/packages /home/slitaz/$(cat /etc/slitaz-release)/packages
    7.39 +		[ -d /boot/src ] && ln -sf /boot/src /home/slitaz/$(cat /etc/slitaz-release)/src
    7.40 +	fi
    7.41 +	if [ "$b" = "mirror" ]; then
    7.42 +		[ -d $REPOS_DIR/slitaz-dev-tools/mirror-tools/mirror-info ] && ln -sf $REPOS_DIR/slitaz-dev-tools/mirror-tools/mirror-info $WWW_DIR/mirror-info
    7.43 +		[ -d $REPOS_DIR/slitaz-dev-tools/mirror-tools/slitaz ] && ln -sf $REPOS_DIR/slitaz-dev-tools/mirror-tools/slitaz $WWW_DIR/slitaz
    7.44 +		[ -d /boot/packages ] && ln -sf /boot/packages $WWW_DIR/slitaz/mirror/packages
    7.45 +		[ -d /boot/src ] && ln -sf /boot/src $WWW_DIR/slitaz/mirror/src
    7.46 +	fi
    7.47 +	if [ "$b" = "tank" ]; then
    7.48 +		[ -d $REPOS_DIR/slitaz-forge/$b/web ] && ln -sf $REPOS_DIR/slitaz-forge/$b/web $WWW_DIR/$b
    7.49 +	fi
    7.50 +	if [ "$b" = "hg" ]; then
    7.51 +		[ -d $WWW_DIR/hg ] || mkdir -p $WWW_DIR/hg
    7.52 +		[ -f /usr/share/examples/mercurial/hgwebdir.cgi ] && ln -sf /usr/share/examples/mercurial/hgwebdir.cgi $WWW_DIR/hg
    7.53 +		[ -f $REPOS_DIR/slitaz-forge/tank/files/etc/mercurial/hgweb.config ] && ln -sf $REPOS_DIR/slitaz-forge/tank/files/etc/mercurial/hgweb.config /etc/mercurial/hgweb.config
    7.54 +	fi
    7.55 +done
    7.56 +
    7.57 +for repo in $REPOS; do
    7.58 +	[ -d $REPOS_DIR/$repo ] || continue
    7.59 +	if [ "$repo" = "flavors" ]; then
    7.60 +		[ -d $REPOS_DIR/$repo ] && ln -sf $REPOS_DIR/$repo $COOKING/$repo
    7.61 +	fi
    7.62 +	if [ "$repo" = "flavors-stable" ]; then
    7.63 +		[ -d $REPOS_DIR/$repo ] && ln -sf $REPOS_DIR/$repo $STABLE/$repo
    7.64 +	fi
    7.65 +	if [ ! -f $REPOS_DIR/$repo/.hg/hgrc-web ]; then
    7.66 +		[ -d $REPOS_DIR/$repo/.hg ] && touch $REPOS_DIR/$repo/.hg/hgrc-web
    7.67 +		[ -d $REPOS_DIR/$repo/.hg ] && echo "[web]" >> $REPOS_DIR/$repo/.hg/hgrc-web
    7.68 +		[ -d $REPOS_DIR/$repo/.hg ] && echo "style = slitaz" >> $REPOS_DIR/$repo/.hg/hgrc-web
    7.69 +		[ -d $REPOS_DIR/$repo/.hg ] && echo "push_ssl = false" >> $REPOS_DIR/$repo/.hg/hgrc-web
    7.70 +		[ -d $REPOS_DIR/$repo/.hg ] && echo "allow_push = *" >> $REPOS_DIR/$repo/.hg/hgrc-web
    7.71 +		[ ! -f $REPOS_DIR/$repo/.hg/hgrc-pull ] && mv $REPOS_DIR/$repo/.hg/hgrc $REPOS_DIR/$repo/.hg/hgrc-pull
    7.72 +		[ ! -f $REPOS_DIR/$repo/.hg/hgrc ] && cp -a $REPOS_DIR/$repo/.hg/hgrc-web $REPOS_DIR/$repo/.hg/hgrc
    7.73 +	fi
    7.74 +	
    7.75 +	if [ ! $(grep -l 'name = ' $REPOS_DIR/$repo/.hg/hgrc ) ]; then
    7.76 +		echo "name = $repo" >> $REPOS_DIR/$repo/.hg/hgrc
    7.77 +	fi
    7.78 +	
    7.79 +	if [ ! $(grep -l 'contact = ' $REPOS_DIR/$repo/.hg/hgrc ) ]; then
    7.80 +		[ "$repo" = "flavors" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.81 +		[ "$repo" = "flavors-stable" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
    7.82 +		[ "$repo" = "slitaz-base-files" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
    7.83 +		[ "$repo" = "slitaz-boot-scripts" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.84 +		[ "$repo" = "slitaz-configs" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.85 +		[ "$repo" = "slitaz-dev-tools" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.86 +		[ "$repo" = "slitaz-doc" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.87 +		[ "$repo" = "slitaz-forge" ] && echo "contact = Eric Joseph-Alexandre" >> $REPOS_DIR/$repo/.hg/hgrc
    7.88 +		[ "$repo" = "slitaz-pizza" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
    7.89 +		[ "$repo" = "slitaz-tools" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.90 +		[ "$repo" = "tazlito" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
    7.91 +		[ "$repo" = "tazpkg" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.92 +		[ "$repo" = "tazusb" ] && echo "contact = Eric Joseph-Alexandre" >> $REPOS_DIR/$repo/.hg/hgrc
    7.93 +		[ "$repo" = "tazwok" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.94 +		[ "$repo" = "website" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.95 +		[ "$repo" = "wok" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.96 +		[ "$repo" = "wok-stable" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.97 +		[ "$repo" = "wok-tiny" ] && echo "contact = Pascal Bellard" >> $REPOS_DIR/$repo/.hg/hgrc
    7.98 +		[ "$repo" = "wok-undigest" ] && echo "contact = Christophe Lincoln" >> $REPOS_DIR/$repo/.hg/hgrc
    7.99 +	fi
   7.100 +	
   7.101 +	if [ ! $(grep -l 'description = ' $REPOS_DIR/$repo/.hg/hgrc) ]; then
   7.102 +		[ "$repo" = "flavors" ] && echo "description = SliTaz Cooking flavors" >> $REPOS_DIR/$repo/.hg/hgrc
   7.103 +		[ "$repo" = "flavors-stable" ] && echo "description = SliTaz Stable flavors" >> $REPOS_DIR/$repo/.hg/hgrc
   7.104 +		[ "$repo" = "slitaz-base-files" ] && echo "description = SliTaz base files" >> $REPOS_DIR/$repo/.hg/hgrc
   7.105 +		[ "$repo" = "slitaz-boot-scripts" ] && echo "description = SliTaz boot scripts" >> $REPOS_DIR/$repo/.hg/hgrc
   7.106 +		[ "$repo" = "slitaz-configs" ] && echo "description = SliTaz configuration files" >> $REPOS_DIR/$repo/.hg/hgrc
   7.107 +		[ "$repo" = "slitaz-dev-tools" ] && echo "description = SliTaz Developers Tools" >> $REPOS_DIR/$repo/.hg/hgrc
   7.108 +		[ "$repo" = "slitaz-doc" ] && echo "description = SliTaz system doc" >> $REPOS_DIR/$repo/.hg/hgrc
   7.109 +		[ "$repo" = "slitaz-forge" ] && echo "description = SliTaz Forge Config" >> $REPOS_DIR/$repo/.hg/hgrc
   7.110 +		[ "$repo" = "slitaz-pizza" ] && echo "description = SliTaz Online flavor builder" >> $REPOS_DIR/$repo/.hg/hgrc
   7.111 +		[ "$repo" = "slitaz-tools" ] && echo "description = SliTaz Tools and Tinyutils" >> $REPOS_DIR/$repo/.hg/hgrc
   7.112 +		[ "$repo" = "tazlito" ] && echo "description = SliTaz Live Tool" >> $REPOS_DIR/$repo/.hg/hgrc
   7.113 +		[ "$repo" = "tazpkg" ] && echo "description = SliTaz Packages manager" >> $REPOS_DIR/$repo/.hg/hgrc
   7.114 +		[ "$repo" = "tazusb" ] && echo "description = SliTaz LiveUSB utility" >> $REPOS_DIR/$repo/.hg/hgrc
   7.115 +		[ "$repo" = "tazwok" ] && echo "description = Slitaz Packages builder" >> $REPOS_DIR/$repo/.hg/hgrc
   7.116 +		[ "$repo" = "website" ] && echo "description = SliTaz Website" >> $REPOS_DIR/$repo/.hg/hgrc
   7.117 +		[ "$repo" = "wok" ] && echo "description = SliTaz Cooking wok" >> $REPOS_DIR/$repo/.hg/hgrc
   7.118 +		[ "$repo" = "wok-stable" ] && echo "description = SliTaz Stable wok" >> $REPOS_DIR/$repo/.hg/hgrc
   7.119 +		[ "$repo" = "wok-tiny" ] && echo "description = Tiny SliTaz wok" >> $REPOS_DIR/$repo/.hg/hgrc
   7.120 +		[ "$repo" = "wok-undigest" ] && echo "description = SliTaz Undigest wok" >> $REPOS_DIR/$repo/.hg/hgrc
   7.121 +	fi
   7.122 +done
   7.123 +
   7.124 +for hostname in $ADDRESS; do 
   7.125 +	END_IP=$(($END_IP+1))
   7.126 +	for i in $END_IP; do
   7.127 +		if [ ! $(grep -l "${BASE_IP}.$i $hostname" /etc/hosts) ]; then
   7.128 +			echo "${BASE_IP}.$i $hostname" >> /etc/hosts
   7.129 +		fi
   7.130 +	done 
   7.131 +done
   7.132 +
   7.133 +[ -f $VHOST_FILE ] && ln -sf $VHOST_FILE /etc/lighttpd/vhosts.conf
   7.134 +chown -R www.www /home/slitaz/www
   7.135 +
   7.136 +if [ "$1" = "on" ]; then
   7.137 +	[ -f /etc/init.d/lighttpd ] && /etc/init.d/lighttpd start
   7.138 +fi
   7.139 +
   7.140 +if [ "$1" = "off" ]; then
   7.141 +	[ -f /etc/init.d/lighttpd ] && /etc/init.d/lighttpd stop
   7.142 +	echo "127.0.0.1 localhost $(cat /etc/hostname)" > /etc/hosts
   7.143 +fi