slitaz-forge rev 285
branch merge
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Apr 16 11:36:11 2012 +0300 (2012-04-16) |
parents | c0e954250657 79bd3f57e8c5 |
children | c4ada3732329 |
files |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mirror/files/usr/bin/chkfilelist Mon Apr 16 11:36:11 2012 +0300 1.3 @@ -0,0 +1,9 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +find /var/www/slitaz/mirror/ -type d | while read dir; do 1.7 + [ "$(ls -altr $dir | sed '$!d; s/.*\(....\)$/\1/')" == "list" ] && continue 1.8 + echo -n "" > $dir/.folderlist 1.9 + chown www.www $dir/.folderlist 1.10 + echo -n "" > $dir/.filelist 1.11 + chown www.www $dir/.filelist 1.12 +done
2.1 --- a/mirror/floppies/mkindex.sh Mon Apr 16 11:34:57 2012 +0300 2.2 +++ b/mirror/floppies/mkindex.sh Mon Apr 16 11:36:11 2012 +0300 2.3 @@ -26,8 +26,8 @@ 2.4 <meta name="description" content="slitaz$LORAM boot floppies $VERSION" /> 2.5 <meta name="robots" content="index, nofollow" /> 2.6 <meta name="author" content="SliTaz Contributors" /> 2.7 - <link rel="shortcut icon" href="/static/favicon.ico" /> 2.8 - <link rel="stylesheet" type="text/css" href="/static/slitaz.css" /> 2.9 + <link rel="shortcut icon" href="static/favicon.ico" /> 2.10 + <link rel="stylesheet" type="text/css" href="static/slitaz.css" /> 2.11 <link rel="stylesheet" type="text/css" href="menu.css" /> 2.12 <style type="text/css"> 2.13 table { 2.14 @@ -53,7 +53,7 @@ 2.15 <ul id="menu"> 2.16 <li> 2.17 <a href="http://www.slitaz.org/"> 2.18 - <img src="/static/home.png" alt="[ home ]" /></a> 2.19 + <img src="static/home.png" alt="[ home ]" /></a> 2.20 </li> 2.21 <li> 2.22 <a href="floppy-grub4dos" title="Boot tools">Generic boot floppy</a> 2.23 @@ -222,7 +222,7 @@ 2.24 <!-- Bottom and logo's --> 2.25 <div id="bottom"> 2.26 <p> 2.27 -<a href="http://validator.w3.org/check?uri=referer"><img src="/static/xhtml10.png" alt="Valid XHTML 1.0" title="Code validé XHTML 1.0" style="width: 80px; height: 15px;" /></a> 2.28 +<a href="http://validator.w3.org/check?uri=referer"><img src="static/xhtml10.png" alt="Valid XHTML 1.0" title="Code validé XHTML 1.0" style="width: 80px; height: 15px;" /></a> 2.29 </p> 2.30 </div> 2.31
3.1 --- a/mirror/root/dir-generator.php Mon Apr 16 11:34:57 2012 +0300 3.2 +++ b/mirror/root/dir-generator.php Mon Apr 16 11:36:11 2012 +0300 3.3 @@ -292,36 +292,42 @@ 3.4 { 3.5 exec("[ -f '".$path."' ]", $tmp, $ret); 3.6 return $ret == 0; 3.7 +//return is_file($path); 3.8 } 3.9 3.10 function my_filesize($path) // 2G+ file support 3.11 { 3.12 return rtrim(shell_exec("stat -Lc %s '".$path."'")); 3.13 +//return filesize($path); 3.14 } 3.15 3.16 function my_filemtime($path) // 2G+ file support 3.17 { 3.18 return rtrim(shell_exec("stat -Lc %Y '".$path."'")); 3.19 +//return filemtime($path); 3.20 } 3.21 3.22 function my_filemtimeasc($path) // 2G+ file support 3.23 { 3.24 - return rtrim(shell_exec("date -r '".$path."' '+%Y-%b-%d %H:%M:%S'")); 3.25 + return rtrim(shell_exec("LC_ALL=C date -r '".$path."' '+%Y-%b-%d %H:%M:%S'")); 3.26 +//return date('Y-M-d H:m:s', filemtime($path)); 3.27 } 3.28 3.29 +if (filesize($path.".folderlist") > 0 && filesize($path.".filelist") > 0) { 3.30 + $folderlist = unserialize(file_get_contents($path.".folderlist")); 3.31 + $filelist = unserialize(file_get_contents($path.".filelist")); 3.32 +} 3.33 +else { 3.34 + 3.35 // Get all of the folders and files. 3.36 $folderlist = array(); 3.37 $filelist = array(); 3.38 if($handle = @opendir($path)) { 3.39 while(($item = readdir($handle)) !== false) { 3.40 if ($item == "index.php") continue; 3.41 + if ($item == ".folderlist") continue; 3.42 + if ($item == ".filelist") continue; 3.43 if ($item == "dir-generator.php") continue; 3.44 - if (isset($_GET['f'])) { 3.45 - $filter = $_GET['f']; 3.46 - if (substr($filter,0,1) != '/') 3.47 - $filter = '/'.$filter.'/i'; 3.48 - if (!preg_match($filter,$item)) continue; 3.49 - } 3.50 if(is_dir($path.'/'.$item) and $item != '.' and $item != '..') { 3.51 $folderlist[] = array( 3.52 'name' => $item, 3.53 @@ -347,8 +353,22 @@ 3.54 } 3.55 } 3.56 closedir($handle); 3.57 + file_put_contents($path.".folderlist",serialize($folderlist),LOCK_EX); 3.58 + file_put_contents($path.".filelist",serialize($filelist),LOCK_EX); 3.59 +} 3.60 } 3.61 3.62 +if (isset($_GET['f'])) { 3.63 + $filter = $_GET['f']; 3.64 + if (substr($filter,0,1) != '/') 3.65 + $filter = '/'.$filter.'/i'; 3.66 + foreach ($filelist as $key => $value) 3.67 + if (!preg_match($filter,$value['name'])) 3.68 + unset($filelist[$key]); 3.69 + foreach ($folderlist as $key => $value) 3.70 + if (!preg_match($filter,$value['name'])) 3.71 + unset($folderlist[$key]); 3.72 +} 3.73 3.74 if(!isset($_GET['s'])) { 3.75 $_GET['s'] = 'name';
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/roadmap/releases/5.0/burn-box.conf Mon Apr 16 11:36:11 2012 +0300 4.3 @@ -0,0 +1,11 @@ 4.4 +# SliTaz task 4.5 + 4.6 +TASK="Code a new Burn Box using Vala or Yad" 4.7 +STATUS="TODO" 4.8 +PRIORITY="2" 4.9 +PEOPLE="pankso" 4.10 +WIKI="" 4.11 +BUGS="" 4.12 + 4.13 +DESC="In 5.0 will not have gtkdialog anymore. So we must port all 4.14 +boxes to Yad, Vala or TazPanel. For burn-box we should use GTK not CGI."
5.1 --- a/tank/tank Mon Apr 16 11:34:57 2012 +0300 5.2 +++ b/tank/tank Mon Apr 16 11:36:11 2012 +0300 5.3 @@ -95,6 +95,9 @@ 5.4 done && echo "" ;; 5.5 adduser) 5.6 echo "" 5.7 + if [ -d /home/$user ]; then 5.8 + echo -e "User $user already exists...\n" && exit 1 5.9 + fi 5.10 if [ -n "$2" ]; then 5.11 user=$2 5.12 else 5.13 @@ -110,9 +113,6 @@ 5.14 else 5.15 echo -n "Password: " && read pass 5.16 fi 5.17 - if [ -d /home/$user ]; then 5.18 - echo -e "User $user already exists...\n" && exit 1 5.19 - fi 5.20 echo "Adding user: $user" 5.21 adduser -D -g "$gecos" $user -G users 5.22 echo $user:$pass | chpasswd --md5