http://bugs.skolelinux.org/show_bug.cgi?id=1421





--- Comment #9 from John Sigurd Skogtvedt <j...@bzz.no>  2010-02-14 14:01:10 ---
How about the following change? It reports a warning rather than an error (are
warning:s reported to the user?), and the message is slightly more helpful.

--- share/debian-edu-config/tools/squid-update-cachedir (revision 62764)
+++ share/debian-edu-config/tools/squid-update-cachedir (working copy)
@@ -25,7 +25,7 @@
     cachedir=$defaultcachedir
 fi
 partsize="$(df -mP $cachedir/. | grep $cachedir | awk '{print $2}')"
-if [ 0 -lt "$partsize" ] ; then
+if [ -n "$partsize" ] && [ 0 -lt "$partsize" ] ; then
     newcachesize=$(( $partsize * $fillpercent / 100 ))
     echo "info: Updating $squidconf to use cache_dir size $newcachesize MB"

@@ -33,7 +33,7 @@
        < "$squidconf" > "$squidconf.new" \
        && mv "$squidconf.new" "$squidconf"
 else
-    echo "error: Unable to calculate size of partition for $cachedir"
+    echo "warning: Not changing squid cache_dir size, default will be used"
 fi

 if [ -x /usr/sbin/invoke-rc.d ] ; then


-- 
Configure bugmail: http://bugs.skolelinux.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1nge62-00013i...@maintainer.skolelinux.no

Reply via email to