[OE-core] [PATCH 2/6] sysvinit: add init.d/bootlogd status command for LSB compliance

Phil Blundell pb at pbcl.net
Tue Aug 20 06:39:44 UTC 2013


On Tue, 2013-08-20 at 11:25 +0800, jackie.huang at windriver.com wrote:
> @@ -37,6 +40,19 @@ case "$0" in
>  		;;
>  esac
>  
> +# default /var/log/boot is not an option since /var/log becomes
> +# /var/volatile/log
> +logfile=/var/local/bootlogd.log
> +
> +#
> +# Create initial log files
> +#
> +if [ ! -f "$logfile" ] && touch "$logfile" >/dev/null 2>&1; then
> +	echo "(Nothing has been logged yet.)" >| "$logfile"
> +	chown root:adm "$logfile"
> +	chmod 640 "$logfile"
> +fi
> +
>  case "$ACTION" in
>  	start)
>  		echo -n "Starting $DESC: "
> @@ -44,9 +60,9 @@ case "$ACTION" in
>  		then
>  			umask 027
>  			start-stop-daemon --start --quiet \
> -				--exec $DAEMON -- -r
> +				--exec $DAEMON -- -r -l $logfile
>  		else
> -			$DAEMON -r
> +			$DAEMON -r -l $logfile
>  		fi
>  		echo "$NAME."
>  		;;

It's not totally obvious that the changes are related to the "status"
command.  If you're creating new logfiles that didn't exist previously
then I think the commit message ought to explain why.

p.





More information about the Openembedded-core mailing list