rbrindley: branch 2.0 r4966 - /branches/2.0/scripts/listfiles
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Mon Jul 13 10:10:19 CDT 2009
Author: rbrindley
Date: Mon Jul 13 10:10:15 2009
New Revision: 4966
URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4966
Log:
- lets do some safer parameter handling
(closes issue #15097)
Reported by: tzafrir
Patches:
listfiles_cleanup.diff uploaded by tzafrir (license 46)
Modified:
branches/2.0/scripts/listfiles
Modified: branches/2.0/scripts/listfiles
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/scripts/listfiles?view=diff&rev=4966&r1=4965&r2=4966
==============================================================================
--- branches/2.0/scripts/listfiles (original)
+++ branches/2.0/scripts/listfiles Mon Jul 13 10:10:15 2009
@@ -1,14 +1,13 @@
#!/bin/sh
+
SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
#/bin/echo "<div id=list_files>" > $SYSINFO_OUTPUT
-/bin/mkdir -p $1
-/bin/ls $1 > $SYSINFO_OUTPUT
+/bim/mkdir -p -- "$1"
#/bin/echo "</div>" >> $SYSINFO_OUTPUT
-if [ "$2" = "time" ]; then
- /bin/ls $1 -r --sort=time > $SYSINFO_OUTPUT
-else
- /bin/ls $1 > $SYSINFO_OUTPUT
+if [ "$2" = "time" ]; then
+ params='-r --sort=time'
fi
+/bin/ls $params -- "$1" > $SYSINFO_OUTPUT
More information about the asterisk-gui-commits
mailing list