[Pkg-voip-commits] r3005 - in asterisk: tags/1.2.14~dfsg-2/debian trunk/debian

Lionel Elie Mamane lionel at mamane.lu
Sat Jan 13 13:39:29 CET 2007


On Sat, Jan 13, 2007 at 12:29:33PM +0100, Kilian Krause wrote:
> Modified: asterisk/tags/1.2.14~dfsg-2/debian/asterisk_fix
> ===================================================================
> --- asterisk/tags/1.2.14~dfsg-2/debian/asterisk_fix	2007-01-13 11:22:04 UTC (rev 3004)
> +++ asterisk/tags/1.2.14~dfsg-2/debian/asterisk_fix	2007-01-13 11:29:33 UTC (rev 3005)
> @@ -27,12 +27,8 @@
>  #             /var/lib/asterisk/sounds/priv-callerintros
>  if [ -d /usr/share/asterisk/sounds/priv-callerintros ];then

For robustness, I'd prefer if we changed that to

 [ -d /usr/share/asterisk/sounds/priv-callerintros ] && ! [ -h /usr/share/asterisk/sounds/priv-callerintros ]; then

Just in case an admin placed the symlink by hand (like I did on my
machines); [ -d ] will evaluate to true on a symlink to a directory.

>  	echo "Updating private callerinfos location to /var/lib/asterisk/sounds/priv-callerintros."
(...)
> +	if [ `find /usr/share/asterisk/sounds/priv-callerintros -mindepth 1|wc -l` -gt 0 ];then
> +		mv /usr/share/asterisk/sounds/priv-callerintros/* /var/lib/asterisk/sounds/priv-callerintros
>  	fi

I'm not very fond of that line, as it will miss files whose name
starts with a dot; arguably, there isn't supposed to be any.

-- 
Lionel



More information about the Pkg-voip-maintainers mailing list