[Buildroot] [PATCH V3 2/5] package/squid: add init script

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Nov 23 21:18:07 UTC 2014


Dear Guillaume GARDET,

On Tue, 18 Nov 2014 15:54:44 +0100, Guillaume GARDET wrote:

> +# (Re)create log directory and give access to squid user (nobody)
> +if [ ! -d $SQUID_LOG_DIR ]; then
> +	mkdir -p $SQUID_LOG_DIR 
> +	chmod 777 $SQUID_LOG_DIR

Clearly, this doesn't look good. Don't we have a better option than 777
the log directory?

> +    restart | force-reload)
> +	$0 stop
> +	sleep 2

sleep 2 really needed here?

> +	$0 start
> +	if [ "$?" != "0" ]; then
> +		exit 1
> +	fi
> +	;;
> +     *)
> +	echo "Usage: /etc/init.d/S97squid {start|stop|restart|force-reload}"

Replace /etc/init.d/S97squid by $0 maybe?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list