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

RE: [PATCH] Add ability to parse conf files from /live/image



> -----Original Message-----
> From: Daniel Baumann [mailto:daniel.baumann@progress-technologies.net]
> Sent: Monday, April 30, 2012 1:45 PM
> To: debian-live@lists.debian.org
> Subject: Re: [PATCH] Add ability to parse conf files from /live/image
> 
> On 04/29/2012 06:43 PM, Ian Geiser wrote:
> >   Before anything is done we parse/etc/live/boot.conf and
> /etc/live/boot.d/*.conf from the initramfs
> >   After the live filesystem has been mounted but before any unions are
> setup then the
> >   live/boot.conf and live/boot.d/*.conf files are parsed.
> 
> please submit patches atomically, means, one patch for adding parsing of the
> conffiles within initramfs (which also updates the manpage to reflect that
> also initramfs is respected), and one to add it from the rootfs, and one from
> the live media.
> 
Fixed, I will resubmit the patch.

> > +if [ -f /etc/live/boot.conf ]
> > +then
> > +	. /etc/boot.conf
> > +if
> 
> don't use -f, but -e; otherwise symlinked configs do not work.
> use the function here as well, and apart from the obvious typo (wrong path
> when sourcing), also respect the boot.d/*.conf files.
fixed

> > +	parse_configs /etc/live
> 
> function names start with a capital letter, and i suggest you name it
> 'Read_configuration'.
Fixed

> > +parse_configs ()
> > +{
> > +	local confdir=${1}
> > +	if [ -f ${confdir}/boot.conf ]
> > +	then
> > +		. ${confdir}/boot.conf
> > +	fi
> 
> same as above; don't use local, and adhere to coding style guidelines as
> included in live-manual.
I will need to research that document.  Out of curiosity why not use local?

> > +
> > +	if ls ${confdir}/boot.d/*.conf>  /dev/null 2>&1
> > +	then
> > +		for conf in ${confdir}/boot.d/*.conf
> > +		do
> > +			. ${conf}
> > +		done
> > +	fi
> > +}
> 
> you'll find a much nicer variant in live-config:
> 
> http://live.debian.net/gitweb?p=live-
> config.git;a=commitdiff;h=07f78e12ce29ab388d51ff70c12cb38e371fa9c7
I will use that one then.

Thanks!


Reply to: