Feature Requests item #1562730, was opened at 2006-09-21 10:44
Message generated for change (Settings changed) made by righiandr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=350259&aid=1562730&group_id=259

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: SystemImager core
Group: None
Status: Open
Priority: 5
Submitted By: Koen Vereeken (plexie)
>Assigned to: Andrea Righi (righiandr)
Summary: incorrect handling of priorities of postinstall scripts

Initial Comment:
The list of postinstall scripts that is build up in the
/etc/init.d/functions script (function
run_post_install_scripts) isn't initialized correctly.

a postinstall script filename begins with two
'runlevel/priority' numbers. 00 has to start before 01,
etc..

These postinstall scripts are grepped by hostname,
basehostname, overrides, imagename and the word 'all'.
Each grep will generate a list of filenames in the
correct priority order, but while merging all those
filenames, the priority order isn't correct anymore.

I corrected this by grepping these 4 patterns at once,
and do a sort -n after that:

POST_INSTALL_SCRIPTS=`ls |grep
"^[0-9][0-9]\(${IMAGENAME}\|${BASE_HOSTNAME}\|${HOSTNAME}\|all\)\..*"
|sort -n`

# POST_INSTALL_SCRIPTS="$POST_INSTALL_SCRIPTS `ls |
grep "^[0-9][0-9]${IMAGENAME}\..*"`"
# POST_INSTALL_SCRIPTS="$POST_INSTALL_SCRIPTS `ls |
grep "^[0-9][0-9]${BASE_HOSTNAME}\..*"`"
# POST_INSTALL_SCRIPTS="$POST_INSTALL_SCRIPTS `ls |
grep "^[0-9][0-9]${HOSTNAME}\..*"`"
# POST_INSTALL_SCRIPTS="$POST_INSTALL_SCRIPTS `ls |
grep "^[0-9][0-9]all\..*"`"

This concerns systemimager version 3.2.3-1. I didn't
checked whether its already corrected in the latest
stable release, but it's worth posting as a bug.

grts

Koen Vereeken

----------------------------------------------------------------------

Comment By: Andrea Righi (righiandr)
Date: 2006-09-22 15:03

Message:
Logged In: YES 
user_id=696767

The priority order is considered within each class. Scripts
are executed first by class using the following order

1. $IMAGENAME
2. $BASE_HOSTNAME
3. $HOSTNAME
4. all
5. $OVERRIDE

..then by number within a class.

So this is not a bug, but if you don't like this behaviour I
consider it as a feature request...

BTW... I like the class-order approach, even if IMHO it
should be better to sort classes in the following order:

1. all
2. $IMAGENAME
3. $BASE_HOSTNAME
4. $HOSTNAME
5. $OVERRIDE

In this way we could be able to override the effects of the
"more global" scripts using "more local" scripts.

What do you (all) think?

-Andrea

PS I'm considering it a new feature for releases > 3.7.4...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=350259&aid=1562730&group_id=259

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sisuite-devel mailing list
Sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to