[Pm-utils] function source_configs?

Stefan Seyfried seife at suse.de
Mon Oct 30 08:14:59 PST 2006


On Mon, Oct 30, 2006 at 10:34:55AM -0500, Peter Jones wrote:
> On Mon, 2006-10-30 at 10:15 +0100, Stefan Seyfried wrote:
> 
> > > +       cfgs="/etc/pm/config.d/*[^~]"
> > > +       for cfg in $cfgs ; do
> > > +               [ -x $cfg ] || continue
> > 
> > until now, config files did not need the eXecutable bit set, so this needs to
> > be documented (or [ -r $cfg ] ||...).
> 
> Documentation would be the way; I want the -x convention, same as in
> e.g. /etc/profile.d , to make it easy for a user turn hooks off without
> losing them completely.

Yes, but config.d are config files, not hooks. I do not care too much,
however :-)

> # export them all here
> add_global HIBERNATE_RESUME_POST_VIDEO
> add_global SUSPEND_MODULES
> 
> Which means the initial progression is:
> 
> ""
> " HIBERNATE_RESUME_POST_VIDEO"
> " HIBERNATE_RESUME_POST_VIDEO SUSPEND_MODULES"
> 
> etc.  So *" HIBERNATE_RESUME_POST_VIDEO *" will match
> "$GLOBAL_CONFIG_VARIABLES ".

OK, that was obviously non-obvious for me :-)
-- 
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen


More information about the Pm-utils mailing list