[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH]: New hook in base-installer



[Otavio Salvador]
> I'm proposing a patch to add a new hook to be called before
> debootstrap run. This is needed for some CDDs (Debian-NP and
> Liberdade are some examples).

I see no reason not to include such hook

> What you think about the patch?

Here are a few comments:

> +	    if [ -x "$script" ] ; then
> +		log "info: Running $script"
> +		if "$script" 2> $tmpfile ; then

It might be a good idea to redirect stdout as well, unless the scripts
should be able to talk to cdebconf.

> +		    :
> +		else
> +		    if [ "$?" = 10 ]; then
> +			log "$script backed up"
> +			exit 10
> +		    fi
> +		    log "warning: $script returned error code $?"
> +		fi
> +		if [ -s "$tmpfile" ] ; then
> +		    logger -t base-installer < "$tmpfile"
> +		fi
> +		rm -f "$tmpfile"

Here, the output from the script is only sent to syslog if it didn't
back out.  It is a good idea to send the output to syslog when it back
out too.



Reply to: