[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#341880: Bug #341880: Proposed modifications to rootskel-gtk and installation-report packages



Hi

To allow users to take screenshots of the g-i, an "/etc/directfb" file containing "screenshot-dir=/var/log" should be provided by the "rootskel-gtk" package. Also, some modifications to the "httpd" web server from "installation-report" package are needed to make the user able to distinguish between log files and screenshots that are stored into /var/log. Attached is a patch to "http" that actually works and produces output like this [1]; an idea for a further improvement would be saving screenshots with names like "debconf/main_menu.N.ppm". ATM this patch allows screenshots to be saved via web only since aren't saved into the selected dir when user chooses "save on mounted filesystem" (still to discover why).
Can i commit to httpd and add the /etc/directfbrc file into gtk-rootskel?

Attilio

[1] https://debian.polito.it/downloads/web_screenshots_saving.png

attilio@attilaptop:~$ diff -u svn/installation-report/httpd ~/httpd
--- svn/installation-report/httpd       2005-12-10 21:41:14.000000000 +0100
+++ /home/attilio/httpd 2005-12-11 00:28:13.000000000 +0100
@@ -41,11 +41,30 @@

 if [ -d "$DOCROOT/$page" ]; then
        header 200 OK "text/html"
-       echo "<html><ul>"
+ echo "<html><head><title>Debian installation logs and screenshots</title></head><body>" + echo "<b>Debian installation logs and screenshots</b><br><br><b>Log files</b><ul>"
+
+       #outputs log files list only
for file in $(cd "$DOCROOT/$page"; find -type f 2>/dev/null | sed 's/^\.\///'); do
-               echo "<li><a href=\"$file\">$file</a>"
+ #workaround for command "find \( -type f ! -name 'dfb*.ppm' \)" not being supported by busybox
+               if [ $(echo $file |grep ppm|wc -l) -eq "0" ]; then
+                       echo "<li><a href=\"$file\">$file</a>"
+               fi
        done
-       echo "</ul></html>"
+       echo "</ul>"
+
+       #outputs screenshots list only
+ screenshots_list=$(cd "$DOCROOT/$page"; find -type f -name 'dfb*.ppm' 2>/dev/null | sed 's/^\.\///'|sort)
+       if [ $(echo -n $screenshots_list| wc -w) -gt "0" ]; then
+               echo "<b>Screenshots (right click and \"Save as\")</b>"
+               echo "<ul>"
+               for file in $screenshots_list; do
+                       echo "<li><a href=\"$file\">$file</a>"
+               done
+               echo "</ul>"
+       fi
+
+       echo "</body></html>"
 elif [ -e "$DOCROOT/$page" ]; then
        header 200 "OK" "text/plain"
        if ! cat "$DOCROOT/$page" 2>/dev/null; then



Reply to: