slitaz-forge rev 166
Add mirror/root for file at mirror.slitaz.org (from slitaz-dev-tools/mirror-tools)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Mar 20 15:44:51 2012 +0100 (2012-03-20) |
parents | 2b97bc6859df |
children | e5baa4584135 |
files | mirror/README mirror/mirror mirror/root/dir-generator.php mirror/root/mirrors mirror/root/pxe/defaults.cfg mirror/root/pxe/mkcfg.sh |
line diff
1.1 --- a/mirror/README Tue Mar 20 15:24:16 2012 +0100 1.2 +++ b/mirror/README Tue Mar 20 15:44:51 2012 +0100 1.3 @@ -8,6 +8,7 @@ 1.4 1.5 * files : Custom system configurations files 1.6 * info : Mirror web interface at http://mirror.slitaz.org/info/ 1.7 + * root : File for the root directory of http://mirror.slitaz.org/ 1.8 1.9 1.10 Host : mirror.slitaz.org
2.1 --- a/mirror/mirror Tue Mar 20 15:24:16 2012 +0100 2.2 +++ b/mirror/mirror Tue Mar 20 15:44:51 2012 +0100 2.3 @@ -9,7 +9,7 @@ 2.4 2.5 REPOS="/home/slitaz/repos" 2.6 WWW="/var/www" 2.7 -VHOST="$WWW/mirror" 2.8 +MIRROR="$WWW/mirror" 2.9 INFO="$WWW/mirror-info" 2.10 TINY="$WWW/pizza/tiny" 2.11 BACKUPS="/home/backups" 2.12 @@ -22,6 +22,7 @@ 2.13 up-info Update mirror.slitaz.org/info/ web interface 2.14 up-tiny Update tiny.slitaz.org/ web interface 2.15 up-mf Update mf.slitaz.org web interface 2.16 + up-mirror Update mirror.slitaz.org files 2.17 2.18 EOT 2.19 } 2.20 @@ -34,10 +35,14 @@ 2.21 up-tiny) 2.22 echo "Updating: tiny.slitaz.org..." 2.23 cd $REPOS/slitaz-pizza && hg pull -u 2.24 - cp -a php/tiny/* $TINY 2.25 + cp -a php/tiny/* $TINY ;; 2.26 up-mf) 2.27 echo "Updating: mf.slitaz.org..." 2.28 cd $REPOS/slitaz-forge && hg pull -u ;; 2.29 + up-mirror) 2.30 + echo "Updating: mirror.slitaz.org files..." 2.31 + cd $REPOS/slitaz-forge && hg pull -u 2.32 + cp -a mirror/root/* $MIRROR ;; 2.33 *) 2.34 usage ;; 2.35 esac
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/mirror/root/dir-generator.php Tue Mar 20 15:44:51 2012 +0100 3.3 @@ -0,0 +1,464 @@ 3.4 +<?php 3.5 +function redirect() 3.6 +{ 3.7 +?> 3.8 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3.9 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3.10 +<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> 3.11 +<head> 3.12 + <title>SliTaz mirror redirection</title> 3.13 + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 3.14 + <meta name="description" content="slitaz mirror redirection" /> 3.15 + <meta name="robots" content="index, nofollow" /> 3.16 + <meta name="author" content="SliTaz Contributors" /> 3.17 + <meta http-equiv="Refresh" content="0;url=http://mirror.slitaz.org/"> 3.18 +</head> 3.19 +<?php 3.20 +} 3.21 + 3.22 +$VERSION = "0.2-slitaz"; 3.23 + 3.24 +/* Lighttpd Enhanced Directory Listing Script 3.25 + * ------------------------------------------ 3.26 + * Authors: Evan Fosmark <me@evanfosmark.com>, 3.27 + * Pascal Bellard <pascal.bellard@slitaz.org> 3.28 + * Christophe Lincoln <pankso@slitaz.org> 3.29 + * 3.30 + * 3.31 + * GNU License Agreement 3.32 + * --------------------- 3.33 + * This program is free software; you can redistribute it and/or modify 3.34 + * it under the terms of the GNU General Public License as published by 3.35 + * the Free Software Foundation; either version 2 of the License, or 3.36 + * (at your option) any later version. 3.37 + * 3.38 + * This program is distributed in the hope that it will be useful, 3.39 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3.40 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3.41 + * GNU General Public License for more details. 3.42 + * 3.43 + * You should have received a copy of the GNU General Public License 3.44 + * along with this program; if not, write to the Free Software 3.45 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 3.46 + * 3.47 + * http://www.gnu.org/licenses/gpl.txt 3.48 + */ 3.49 + 3.50 +// Get the path (cut out the query string from the request_uri) 3.51 +list($path) = explode('?', $_SERVER['REQUEST_URI']); 3.52 + 3.53 + 3.54 +// Get the path that we're supposed to show. 3.55 +$path = ltrim(rawurldecode($path), '/'); 3.56 + 3.57 + 3.58 +if(strlen($path) == 0) { 3.59 + $path = "./"; 3.60 +} 3.61 + 3.62 + 3.63 +// Can't call the script directly since REQUEST_URI won't be a directory 3.64 +if($_SERVER['PHP_SELF'] == '/'.$path) { 3.65 + redirect(); 3.66 +// die("Unable to call " . $path . " directly."); 3.67 +} 3.68 + 3.69 + 3.70 +$vpath = ($path != "./")?$path:""; 3.71 +// Make sure it is valid. 3.72 +if(!is_dir($path)) { 3.73 +// die("<b>" . $path . "</b> is not a valid path."); 3.74 + $path = dirname($_SERVER["SCRIPT_FILENAME"]); 3.75 + list($vpath) = explode('?', $_SERVER['REQUEST_URI']); 3.76 + $vpath = ltrim(rawurldecode($vpath), '/'); 3.77 +} 3.78 + 3.79 + 3.80 +// 3.81 +// This function returns the file size of a specified $file. 3.82 +// 3.83 +function format_bytes($size, $precision=1) { 3.84 + $sizes = array('Y', 'Z', 'E', 'P', 'T', 'G', 'M', 'K', ''); 3.85 + $total = count($sizes); 3.86 + 3.87 + while($total-- && $size > 1024) $size /= 1024; 3.88 + if ($sizes[$total] == '') { 3.89 + $size /= 1024; 3.90 + $total--; 3.91 + } 3.92 + return sprintf('%.'.$precision.'f', $size).$sizes[$total]; 3.93 +} 3.94 + 3.95 +// 3.96 +// Get some variables from /etc/lighttpd/lighttpd.conf 3.97 +// 3.98 +$conf_lightty = file_get_contents("/etc/lighttpd/lighttpd.conf"); 3.99 + 3.100 +function get_conf($var,$start,$stop,$default='') { 3.101 + global $conf_lightty; 3.102 + 3.103 + if (!preg_match('/'.$var.'/',$conf_lightty)) return $default; 3.104 + $filter = '/(.*\n)*'.$var.'\s*=\s*'.$start.'(([^'.$stop.']*\n*)*)'.$stop.'(.*\n)*/'; 3.105 + return preg_replace($filter,'$2',$conf_lightty); 3.106 +} 3.107 + 3.108 +$encoding = get_conf('dir-listing.encoding','"','"','ascii'); 3.109 +$external_css = get_conf('dir-listing.external-css','"','"'); 3.110 + 3.111 +$show_hidden_files = false; 3.112 +if (get_conf('dir-listing.hide-dotfile','"','"','disable') == "disable") { 3.113 + $show_hidden_files = true; 3.114 +} 3.115 +// get_conf('dir-listing.exclude','\(','\)'); 3.116 +// get_conf('dir-listing.set-footer','"','"'); 3.117 + 3.118 +$mime_types = array(); 3.119 +foreach (explode(',',get_conf('mimetype.assign','\(','\)')) as $item) { 3.120 + $filter = '/\s*"(.*)"\s*=>\s*"(.*)".*/'; 3.121 + $val = explode(',',preg_replace($filter,'$1,$2',$item)); 3.122 + if (isset($val[1])) $mime_types[$val[0]] = $val[1]; 3.123 +} 3.124 + 3.125 +// 3.126 +// This function returns the mime type of $file. 3.127 +// 3.128 +function get_file_type($file) { 3.129 + global $mime_types; 3.130 + 3.131 + $file = basename($file); 3.132 + $default_type = "application/octet-stream"; 3.133 + if (isset($mime_types[$file])) { 3.134 + return $mime_types[$file]; 3.135 + } 3.136 + $pos = strrpos($file, "."); 3.137 + if ($pos === false) { 3.138 + return $default_type; 3.139 + } 3.140 +//FIXME .tar.gz 3.141 + $ext = '.'.rtrim(substr($file, $pos+1), "~"); 3.142 + if (isset($mime_types[$ext])) { 3.143 + return $mime_types[$ext]; 3.144 + } 3.145 + return $default_type; 3.146 +} 3.147 + 3.148 +//$slitaz_style = (dirname($_SERVER["PHP_SELF"]) == '/'); 3.149 +//$slitaz_style = ($_SERVER["SERVER_NAME"] == "mirror.slitaz.org"); 3.150 +$slitaz_style = preg_match("/mirror\.slitaz\./",$_SERVER["SERVER_NAME"]); 3.151 +if ($slitaz_style) { 3.152 + $fvalue = ""; 3.153 + if (isset($_GET['f'])) $fvalue = 'value="'.$_GET['f'].'"'; 3.154 + print <<<EOT 3.155 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3.156 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3.157 +<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> 3.158 +<head> 3.159 + <title>Index of /$vpath</title> 3.160 + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 3.161 + <meta name="description" content=">Index of /$vpath" /> 3.162 + <meta name="robots" content="index, nofollow" /> 3.163 + <meta name="author" content="SliTaz Contributors" /> 3.164 + <link rel="shortcut icon" href="http://mf.slitaz.org//favicon.ico" /> 3.165 + <link rel="stylesheet" type="text/css" href="http://mf.slitaz.org/css/slitaz.css" /> 3.166 + <link rel="stylesheet" type="text/css" href="http://mf.slitaz.org/css/mirror.css" /> 3.167 +</head> 3.168 +<body> 3.169 + 3.170 +<!-- Header --> 3.171 +<div id="header"> 3.172 + <div id="logo"></div> 3.173 + <div id="network"> 3.174 + <a href="http://www.slitaz.org/"> 3.175 + <img src="http://mf.slitaz.org/images/home.png" alt="[ Home ]" /> 3.176 + Home</a> 3.177 + <a href="http://scn.slitaz.org/">Community</a> 3.178 + <a href="http://doc.slitaz.org/">Doc</a> 3.179 + <a href="http://forum.slitaz.org/">Forum</a> 3.180 + <a href="http://pro.slitaz.org/">Pro</a> 3.181 + <a href="https://slitaz.spreadshirt.net/">Shop</a> 3.182 + <a href="http://bugs.slitaz.org">Bugs</a> 3.183 + <a href="http://hg.slitaz.org/">Hg</a> 3.184 + <a href="http://cook.slitaz.org/">BB</a> 3.185 + </div> 3.186 + <h1><a href="http://mirror.slitaz.org/">SliTaz Mirror</a> /${vpath}</h1> 3.187 +</div> 3.188 + 3.189 +<!-- Block --> 3.190 +<div id="block"> 3.191 + <!-- Navigation --> 3.192 + <div id="block_nav"> 3.193 + <h4>Online Tools</h4> 3.194 + <ul> 3.195 + <li><a href="http://pizza.slitaz.org/">Live Builder</a></li> 3.196 + <li><a href="http://boot.slitaz.org/">Web Boot</a></li> 3.197 + </ul> 3.198 + </div> 3.199 + <!-- Information/image --> 3.200 + <div id="block_info"> 3.201 + <h4>Welcome to Open Source!</h4> 3.202 +EOT; 3.203 + if (preg_match("/mirror\.slitaz\./",$_SERVER["SERVER_NAME"])) print <<<EOT 3.204 + <p>This is the SliTaz GNU/Linux main mirror. The server runs naturally 3.205 + SliTaz (stable) in an lguest virtual machine provided by 3.206 + <a href="http://www.ads-lu.com/">ADS</a>. 3.207 + <a href="/info/">Mirror info...</a></p> 3.208 +EOT; 3.209 + print <<<EOT 3.210 + <form action="${_SERVER["REQUEST_URI"]}" method="get" style="width: 300px;"> 3.211 + <p><input type="text" name="f" $fvalue 3.212 + style="width: auto;" /></p> 3.213 + </form> 3.214 + </div> 3.215 +</div> 3.216 + 3.217 +<div id="lang"> 3.218 +EOT; 3.219 + 3.220 +// Mirror list 3.221 +$mirrors = array(); 3.222 +$fp = @fopen(dirname($_SERVER["SCRIPT_FILENAME"])."/mirrors","r"); 3.223 +if ($fp) { 3.224 + while (($line = fgets($fp)) !== false) { 3.225 + $line = chop($line); 3.226 + $url = parse_url($line); 3.227 + if ($_SERVER["SERVER_NAME"] == $url['host']) continue; 3.228 + $host = explode('.',$url['host']); 3.229 + $mirrors[$host[count($host)-2].".". 3.230 + $host[count($host)-1]] = $line; 3.231 + } 3.232 +} 3.233 +fclose($fp); 3.234 +foreach($mirrors as $name => $url) { 3.235 + echo "<a href=\"$url$vpath\" title=\"$name mirror\">$name</a>\n"; 3.236 +} 3.237 + 3.238 +print <<<EOT 3.239 +</div> 3.240 + 3.241 +<!-- Content --> 3.242 +<div id="content"> 3.243 + 3.244 +EOT; 3.245 +} 3.246 +else { 3.247 + 3.248 +// Print the heading stuff 3.249 +print "<?xml version='1.0' encoding='$encoding'?> 3.250 +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> 3.251 +<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'> 3.252 + <head> 3.253 + <title>Index of /" .$vpath. "</title> 3.254 +"; 3.255 +if ($external_css != '') { 3.256 +print " <link rel='stylesheet' type='text/css' href='".$external_css."' /> 3.257 +"; 3.258 +} 3.259 +else { 3.260 +print " <style type='text/css'> 3.261 + a, a:active {text-decoration: none; color: blue;} 3.262 + a:visited {color: #48468F;} 3.263 + a:hover, a:focus {text-decoration: underline; color: red;} 3.264 + body {background-color: #F5F5F5;} 3.265 + h2 {margin-bottom: 12px;} 3.266 + table {margin-left: 12px;} 3.267 + th, td { font: 90% monospace; text-align: left;} 3.268 + th { font-weight: bold; padding-right: 14px; padding-bottom: 3px;} 3.269 + td {padding-right: 14px;} 3.270 + td.s, th.s {text-align: right;} 3.271 + div.list { background-color: white; border-top: 1px solid #646464; border-bottom: 1px solid #646464; padding-top: 10px; padding-bottom: 14px;} 3.272 + div.foot { font: 90% monospace; color: #787878; padding-top: 4px;} 3.273 + </style> 3.274 +"; 3.275 +} 3.276 +print " </head> 3.277 + <body> 3.278 + <h2>Index of /" . $vpath ."</h2> 3.279 +"; 3.280 +} 3.281 + 3.282 +print " <div class='list'> 3.283 + <table summary='Directory Listing' cellpadding='0' cellspacing='0'> 3.284 +"; 3.285 + 3.286 +function my_is_file($path) // 2G+ file support 3.287 +{ 3.288 + exec("[ -f '".$path."' ]", $tmp, $ret); 3.289 + return $ret == 0; 3.290 +} 3.291 + 3.292 +function my_filesize($path) // 2G+ file support 3.293 +{ 3.294 + return rtrim(shell_exec("stat -Lc %s '".$path."'")); 3.295 +} 3.296 + 3.297 +function my_filemtime($path) // 2G+ file support 3.298 +{ 3.299 + return rtrim(shell_exec("stat -Lc %Y '".$path."'")); 3.300 +} 3.301 + 3.302 +function my_filemtimeasc($path) // 2G+ file support 3.303 +{ 3.304 + return rtrim(shell_exec("date -r '".$path."' '+%Y-%b-%d %H:%M:%S'")); 3.305 +} 3.306 + 3.307 +// Get all of the folders and files. 3.308 +$folderlist = array(); 3.309 +$filelist = array(); 3.310 +if($handle = @opendir($path)) { 3.311 + while(($item = readdir($handle)) !== false) { 3.312 + if ($item == "index.php") continue; 3.313 + if ($item == "dir-generator.php") continue; 3.314 + if (isset($_GET['f'])) { 3.315 + $filter = $_GET['f']; 3.316 + if (substr($filter,0,1) != '/') 3.317 + $filter = '/'.$filter.'/i'; 3.318 + if (!preg_match($filter,$item)) continue; 3.319 + } 3.320 + if(is_dir($path.'/'.$item) and $item != '.' and $item != '..') { 3.321 + $folderlist[] = array( 3.322 + 'name' => $item, 3.323 + 'size' => 0, 3.324 + 'modtime'=> filemtime($path.'/'.$item), 3.325 + 'modtimeasc'=> my_filemtimeasc($path.'/'.$item), 3.326 + 'file_type' => "Directory" 3.327 + ); 3.328 + } 3.329 + elseif(my_is_file($path.'/'.$item)) { 3.330 + if(!$show_hidden_files) { 3.331 + if(substr($item, 0, 1) == "." or substr($item, -1) == "~") { 3.332 + continue; 3.333 + } 3.334 + } 3.335 + $filelist[] = array( 3.336 + 'name'=> $item, 3.337 + 'size'=> my_filesize($path.'/'.$item), 3.338 + 'modtime'=> my_filemtime($path.'/'.$item), 3.339 + 'modtimeasc'=> my_filemtimeasc($path.'/'.$item), 3.340 + 'file_type' => get_file_type($path.'/'.$item) 3.341 + ); 3.342 + } 3.343 + } 3.344 + closedir($handle); 3.345 +} 3.346 + 3.347 + 3.348 +if(!isset($_GET['s'])) { 3.349 + $_GET['s'] = 'name'; 3.350 +} 3.351 + 3.352 +// Figure out what to sort files by 3.353 +$file_order_by = array(); 3.354 +foreach ($filelist as $key=>$row) { 3.355 + $file_order_by[$key] = $row[$_GET['s']]; 3.356 +} 3.357 + 3.358 +// Figure out what to sort folders by 3.359 +$folder_order_by = array(); 3.360 +foreach ($folderlist as $key=>$row) { 3.361 + $folder_order_by[$key] = $row[$_GET['s']]; 3.362 +} 3.363 + 3.364 +// Order the files and folders 3.365 +$sort_type = SORT_ASC; 3.366 +$order = "&o=d"; 3.367 +if(isset($_GET['o'])) { 3.368 + $sort_type = SORT_DESC; 3.369 + $order = ""; 3.370 +} 3.371 +array_multisort($folder_order_by, $sort_type, $folderlist); 3.372 +array_multisort($file_order_by, $sort_type, $filelist); 3.373 + 3.374 + 3.375 +// Show sort methods 3.376 +print "<thead><tr>"; 3.377 + 3.378 +$sort_methods = array(); 3.379 +$sort_methods['name'] = "Name"; 3.380 +$sort_methods['modtime'] = "Last Modified"; 3.381 +$sort_methods['size'] = "Size"; 3.382 +$sort_methods['file_type'] = "Type"; 3.383 + 3.384 +foreach($sort_methods as $key=>$item) { 3.385 + if ($_GET['s'] == $key) $key = "$key$order"; 3.386 + print "<th class='n'><a href='?s=$key'>$item</a></th>"; 3.387 +} 3.388 +print "</tr></thead>\n<tbody>\n"; 3.389 + 3.390 + 3.391 + 3.392 +// Parent directory link 3.393 +if($path != "./") { 3.394 + print "<tr><td class='n'><a href='..'>Parent Directory</a>/</td>"; 3.395 + print "<td class='m'> </td>"; 3.396 + print "<td class='s'>- </td>"; 3.397 + print "<td class='t'>Directory</td></tr>\n"; 3.398 +} 3.399 + 3.400 + 3.401 + 3.402 +// Print folder information 3.403 +foreach($folderlist as $folder) { 3.404 + print "<tr><td class='n'><a href='" . addslashes($folder['name']). "'>" .htmlentities($folder['name']). "</a>/</td>"; 3.405 + print "<td class='m'>" . $folder['modtimeasc'] . "</td>"; 3.406 + print "<td class='s'>- </td>"; 3.407 + print "<td class='t'>" . $folder['file_type'] . "</td></tr>\n"; 3.408 +} 3.409 + 3.410 + 3.411 +// Print file information 3.412 +foreach($filelist as $file) { 3.413 + print "<tr><td class='n'><a href='" . addslashes($file['name']). "'>" .htmlentities($file['name']). "</a></td>"; 3.414 + print "<td class='m'>" . $file['modtimeasc'] . "</td>"; 3.415 + print "<td class='s'>" . format_bytes($file['size']) . "</td>"; 3.416 + print "<td class='t'>" . $file['file_type'] . "</td></tr>\n"; 3.417 +} 3.418 + 3.419 +// Print ending stuff 3.420 +$soft = explode('/',$_SERVER["SERVER_SOFTWARE"]); 3.421 +$tag = get_conf('server.tag','"','"',$soft[0].' <'.$soft[1].'>'); 3.422 +print "</tbody> 3.423 + </table> 3.424 + </div>"; 3.425 +if ($slitaz_style) { ?> 3.426 + 3.427 +<!-- End of content --> 3.428 +</div> 3.429 + 3.430 +<!-- Footer --> 3.431 +<div id="footer"> 3.432 + Copyright © <span class="year"></span> 3.433 + <a href="http://www.slitaz.org/">SliTaz</a> - Network: 3.434 + <a href="http://scn.slitaz.org/">Community</a> 3.435 + <a href="http://doc.slitaz.org/">Doc</a> 3.436 + <a href="http://forum.slitaz.org/">Forum</a> 3.437 + <a href="http://pkgs.slitaz.org/">Packages</a> 3.438 + <a href="http://bugs.slitaz.org">Bugs</a> 3.439 + <a href="http://hg.slitaz.org/">Hg</a> 3.440 + <p> 3.441 + SliTaz @ 3.442 + <a href="http://twitter.com/slitaz">Twitter</a> 3.443 + <a href="http://www.facebook.com/slitaz">Facebook</a> 3.444 + <a href="http://distrowatch.com/slitaz">Distrowatch</a> 3.445 + <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a> 3.446 + <a href="http://flattr.com/profile/slitaz">Flattr</a> 3.447 + </p> 3.448 + <p> 3.449 + <a href="http://validator.w3.org/check?uri=referer"> 3.450 + <img src="/css/pics/website/xhtml10.png" 3.451 + alt="Valid XHTML 1.0" title="Code validé XHTML 1.0" 3.452 + style="width: 80px; height: 15px;" /></a> 3.453 + </p> 3.454 +</div> 3.455 + 3.456 +<?php } 3.457 +else print " 3.458 + <form action='".$_SERVER["REQUEST_URI"]."' method='get'> 3.459 + <div class='foot'>".$tag." 3.460 + <input type='text' name='f'/> 3.461 + <!-- <input type='submit' value='Filter' /> --> 3.462 + </div> 3.463 + </form> 3.464 +"; 3.465 +print "</body> 3.466 + </html>"; 3.467 +?>
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/mirror/root/mirrors Tue Mar 20 15:44:51 2012 +0100 4.3 @@ -0,0 +1,17 @@ 4.4 +http://mirror.slitaz.org/ 4.5 +http://mirror.switch.ch/ftp/mirror/slitaz/ 4.6 +ftp://mirror.switch.ch/mirror/slitaz/ 4.7 +http://www.gtlib.gatech.edu/pub/slitaz/ 4.8 +ftp://ftp.gtlib.gatech.edu/pub/slitaz/ 4.9 +http://download.tuxfamily.org/slitaz/ 4.10 +ftp://download.tuxfamily.org/slitaz/ 4.11 +http://mirror.lupaworld.com/slitaz/ 4.12 +http://slitaz.c3sl.ufpr.br/ 4.13 +ftp://slitaz.c3sl.ufpr.br/slitaz/ 4.14 +http://slitaz.mirror.garr.it/mirrors/slitaz/ 4.15 +ftp://slitaz.mirror.garr.it/mirrors/slitaz/ 4.16 +ftp://ftp.pina.si/slitaz/ 4.17 +http://distro.ibiblio.org/pub/linux/distributions/slitaz/ 4.18 +http://ftp.ch.xemacs.org/ftp/pool/2/mirror/slitaz/ 4.19 +ftp://ftp.ch.xemacs.org//pool/2/mirror/slitaz/ 4.20 +http://mirror.clarkson.edu/slitaz/
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/mirror/root/pxe/defaults.cfg Tue Mar 20 15:44:51 2012 +0100 5.3 @@ -0,0 +1,17 @@ 5.4 +default menu.c32 5.5 +prompt 0 5.6 + 5.7 +MENU TITLE Slitaz Web boot http://www.slitaz.org/ 5.8 +ALLOWOPTIONS 0 5.9 +MENU MARGIN 0 5.10 +MENU ROWS 17 5.11 +MENU COLOR BORDER 37;44 #40000000 #00000000 std 5.12 +MENU COLOR TITLE 1;33;44 #c00090f0 #00000000 std 5.13 +MENU COLOR SCROLLBAR 37;44 #40000000 #00000000 std 5.14 + 5.15 +#MENU COLOR TIMEOUT_MSG 1;33;44 #c00090f0 #00000000 std 5.16 +#MENU COLOR TIMEOUT 37;40 #80ffffff #00000000 std 5.17 +MENU TIMEOUTROW 25 5.18 +MENU AUTOBOOT Start cooking in # second{,s} 5.19 +timeout 100 5.20 +TOTALTIMEOUT 9000
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/mirror/root/pxe/mkcfg.sh Tue Mar 20 15:44:51 2012 +0100 6.3 @@ -0,0 +1,176 @@ 6.4 +#!/bin/sh 6.5 + 6.6 +#usage: 6.7 +# copy /boot/isolinux/* <version> 6.8 +# remove *.cfg 6.9 +# copy then update /boot/isolinux/isolinux.cfg <version>core.cfg 6.10 + 6.11 +cd $(dirname $0) 6.12 + 6.13 +# Status functions. 6.14 +status() 6.15 +{ 6.16 + local CHECK=$? 6.17 + echo -en "\\033[70G[ " 6.18 + if [ $CHECK = 0 ]; then 6.19 + echo -en "\\033[1;33mOK" 6.20 + else 6.21 + echo -en "\\033[1;31mFailed" 6.22 + fi 6.23 + echo -e "\\033[0;39m ]" 6.24 +} 6.25 + 6.26 +directlinks() 6.27 +{ 6.28 + mkdir $1/$2 6.29 + ln -s .. $1/$2/$1 6.30 + ln -s ../$2.cfg $1/$2/default 6.31 + ln -s ../../pxelinux.0 $1/$2/pxelinux.0 6.32 + ln -s . $1/$2/pxelinux.cfg 6.33 + [ -e $1/boot ] || ln -s ../../boot $1/boot 6.34 +} 6.35 +for version in cooking $(ls ../boot | grep 0$) ; do 6.36 + 6.37 +[ "$version" = "1.0" ] && continue 6.38 +echo -n "Building $version" 6.39 +for i in splash.lss isolinux.msg core.cfg ; do 6.40 + [ -s $version/$i ] && continue 6.41 + echo -n " $version/$i not found !" 6.42 + false 6.43 + status 6.44 + continue 2 6.45 +done 6.46 +if ! grep -q $version/splash.lss $version/isolinux.msg ; then 6.47 + echo "WARNING: please update $version/isolinux.msg with $version/splash.lss" 6.48 +fi 6.49 +rm -f $version/*-*.cfg 6.50 +( cd ../boot/$version ; ls rootfs-*.gz 2> /dev/null ) | \ 6.51 +sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do 6.52 + lowcased=$(echo $flavor | tr [A-Z] [a-z]) 6.53 + if [ "$lowcased" != "$flavor" ]; then 6.54 + echo "" 6.55 + echo "Warning : renaming ../boot/$version/rootfs-$flavor.gz to ../boot/$version/rootfs-$lowcased.gz" 6.56 + mv ../boot/$version/rootfs-$flavor.gz ../boot/$version/rootfs-$lowcased.gz 6.57 + flavor=$lowcased 6.58 + fi 6.59 + [ -f $version/$flavor.cfg ] && continue 6.60 + cp $version/core.cfg $version/$flavor.cfg 6.61 + sed -i -e "s/core-common/$flavor-common/" \ 6.62 + -e "s/^label slitaz$/say Using $flavor flavor.\nlabel slitaz/" \ 6.63 + -e "s/rootfs.gz/rootfs-$flavor.gz/" $version/$flavor.cfg 6.64 + directlinks $version $flavor 6.65 +done 6.66 +for flavor in $(cd $version ; ls *.cfg | sed 's/.cfg//') ; do 6.67 + echo -n " $flavor" 6.68 + cat > $version/$flavor-common.cfg <<EOT 6.69 +default slitaz 6.70 +label deCH 6.71 + config $version/$flavor-de_CH.cfg 6.72 +label frCH 6.73 + config $version/$flavor-fr_CH.cfg 6.74 +label reboot 6.75 + com32 reboot.c32 6.76 + 6.77 +implicit 0 6.78 +prompt 1 6.79 +timeout 80 6.80 +F1 $version/help.txt 6.81 +F2 $version/options.txt 6.82 +F3 $version/isolinux.msg 6.83 +F4 $version/display.txt 6.84 +F5 $version/enhelp.txt 6.85 +F6 $version/enopts.txt 6.86 + 6.87 +EOT 6.88 + while read cfg kbd loc ; do 6.89 + if [ ! -f $version/$cfg.kbd ]; then 6.90 + echo "" 6.91 + echo "Not found: $version/$cfg.kbd" 6.92 + fi 6.93 + info="Now using $kbd keyboard and $loc locale." 6.94 + sed -e "s/^display/kbdmap $version\/$cfg.kbd\ndisplay/" \ 6.95 + -e "s/^label slitaz$/say $info\nlabel slitaz/" \ 6.96 + -e "s/gz/gz lang=$loc kmap=$kbd/" \ 6.97 + < $version/$flavor.cfg > $version/$flavor-$cfg.cfg 6.98 + cat >> $version/$flavor-common.cfg <<EOT 6.99 +label $cfg 6.100 + config $version/$flavor-$cfg.cfg 6.101 +EOT 6.102 + done <<EOT 6.103 +be be-latin1 fr_FR 6.104 +br br-abnt2 pt_PT 6.105 +ca cf fr_FR 6.106 +de de-latin1 de_DE 6.107 +de_CH de_CH-latin1 de_DE 6.108 +en uk C 6.109 +es es es_ES 6.110 +fi fi-latin1 fi 6.111 +fr fr-latin1 fr_FR 6.112 +fr_CH fr_CH-latin1 fr_FR 6.113 +hu hu hu 6.114 +it it it_IT 6.115 +jp jp106 jp_JP 6.116 +pt pt-latin1 pt_PT 6.117 +ru ru ru_RU 6.118 +us us C 6.119 +EOT 6.120 +done 6.121 +status 6.122 + 6.123 +done 6.124 + 6.125 +echo -n "Building 1.0" 6.126 +rm -f 1.0/*-*.cfg 6.127 +( cd ../boot/1.0 ; ls rootfs-*.gz 2> /dev/null ) | \ 6.128 +sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do 6.129 + [ -f 1.0/$flavor.cfg ] && continue 6.130 + cp 1.0/core.cfg 1.0/$flavor.cfg 6.131 + sed -i -e "s/core-common/$flavor-common/" \ 6.132 + -e "s/rootfs.gz/rootfs-$flavor.gz/" 1.0/$flavor.cfg 6.133 + directlinks 1.0 $flavor 6.134 +done 6.135 +directlinks 1.0 core 6.136 +for flavor in $(cd 1.0; ls *.cfg | sed 's/.cfg//') ; do 6.137 + echo -n " $flavor" 6.138 + cat > 1.0/$flavor-common.cfg <<EOT 6.139 +default slitaz 6.140 + 6.141 +label def 6.142 + config 1.0/$flavor.cfg 6.143 + 6.144 +label reboot 6.145 + com32 reboot.c32 6.146 + 6.147 +implicit 0 6.148 +prompt 1 6.149 +timeout 80 6.150 +F1 1.0/help.txt 6.151 +F2 1.0/options.txt 6.152 +F3 1.0/isolinux.msg 6.153 +F4 1.0/display.txt 6.154 +EOT 6.155 + while read cfg kbd loc ; do 6.156 + if [ ! -f 1.0/$cfg.kbd ]; then 6.157 + echo "" 6.158 + echo "Not found: 1.0/$cfg.kbd" 6.159 + fi 6.160 + sed -e "s/^display/KBDMAP 1.0\/$cfg.kbd\ndisplay/" \ 6.161 + -e "s/gz/gz lang=$loc kmap=$kbd/" \ 6.162 + < 1.0/$flavor.cfg > 1.0/$flavor-$cfg.cfg 6.163 + cat >> 1.0/$flavor-common.cfg <<EOT 6.164 +label $cfg 6.165 + config 1.0/$flavor-$cfg.cfg 6.166 +EOT 6.167 + done <<EOT 6.168 +be be fr 6.169 +ca ca fr 6.170 +de_CH fr_CH fr_CH 6.171 +en en en 6.172 +es es en 6.173 +fr fr fr 6.174 +fr_CH fr_CH fr_CH 6.175 +it it en 6.176 +us us en 6.177 +EOT 6.178 +done 6.179 +status