tazpanel rev 102

pkgs.cgi: check conf files links
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 14 23:41:06 2011 +0200 (2011-04-14)
parents 12dfc9e0bdfe
children 0b4950af683b
files pkgs.cgi
line diff
     1.1 --- a/pkgs.cgi	Thu Apr 14 22:44:01 2011 +0200
     1.2 +++ b/pkgs.cgi	Thu Apr 14 23:41:06 2011 +0200
     1.3 @@ -549,8 +549,14 @@
     1.4  				listconf)
     1.5  					echo "<h4>`gettext "Configuration files"`</h4>"
     1.6  					echo "<ul>"
     1.7 -					tazpkg list-config | sed \
     1.8 -				'/^\//!d;s/.*/<li><a href="index.cgi?file=&">&<\/a><\/li>/'
     1.9 +					tazpkg list-config | while read file; do
    1.10 +						[ "${file:0:1}" == "/" ] || continue
    1.11 +						if [ -e $file ]; then
    1.12 +							echo "<li><a href=\"index.cgi?file=$file\">$file</a></li>"
    1.13 +						else
    1.14 +							echo "<li>$file</li>"
    1.15 +						fi
    1.16 +					done
    1.17  					echo "</ul>"
    1.18  					echo "</pre>" ;;
    1.19  				quickcheck)