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

Bug#422088: [Patch] wish preseed_fetch could distinguish between non-existance of a requested file and other failures to fetch file.

Alex Owen wrote:
>  		# TODO add progress bar
> -		if wget -q "$url" -O "$file"; then
> +		if wget -q "$url" -O "$file" 2>$log ; then
> +			rm -f $log
>  			return 0
> +		elif	grep "server returned error 404" $log >/dev/null ; then

It's generally not a good idea to rely on command error messages like

> A custom preseed setup could have 2 dirs such as:
> $base/standard
> $base/local
> a master preseed script could then try to do
>  "preseed_fetch $base/local/script"
> and if this exits with status 4 fall back to
>  "preseed_fetch $base/standard/script"

An alternative way to do this is to first always load the standard preseed
file, and then try to fetch the load preseed file, which if it exists, can
override settings in the standard file.

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: