[Top][All Lists]

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

Re: [Tiger-devel] [RFC] Moving some check_root checks into OS specific c

From: Javier Fernandez-Sanguino
Subject: Re: [Tiger-devel] [RFC] Moving some check_root checks into OS specific checks.
Date: Fri, 27 Jun 2003 00:31:00 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

Nicolas François wrote:
Hello all,

On Thu, Jun 26, 2003 at 09:39:52AM +0200, Javier Fernandez-Sanguino wrote:

Yes, one of the things I wanted to implement in the main engine is to be able to override common checks with local (OS-specific) checks. That's in the TODO:

"- Modify Tiger so it can use a system's scripts if it exists and substitute the one under scripts/ by introducing a run_script funcion (check if the script is under scripts and under systems/$OS/... and run it)"

I think this can be done by swapping SCRIPTDIR and LSCRIPTDIR in
tigercron :

This would work only for tigercron. I was thinking more on the line of providing a new function in initdefs (which gets sourced by both tiger and tigercron) called 'runtigerscript' which basicly would do the something similar to:

runtigerscript ()
   # BASEDIR and SCRIPTDIR have been defined by config
   # The default
   if [ -f "$SYSDIR/$OS/$REL/$REV/$ARCH/$script" ]; then
   elif [ -f "$SYSDIR/$OS/$REL/$REV/$script" ]; then
   elif [ -f "$SYSDIR/$OS/$REL/config" ]; then
   elif [ -f "$SYSDIR/$OS/$script" ]; then
   if [ -x "$RUNSCRIPT" ] ; then
       echo "Cannot execute $script (no suitable version found)"

Of course, this would need to work properly with the way tiger and tigercron run scripts (redirecting output to a file) but it's generic enough that the code in tigercron which uses SCRIPTDIR/LSCRIPTDIR could be substituted with this and the calls to scripts in tiger would just need to do 'runtigerscript NAME_OF_SCRIPT'

As a matter of fact the SCRIPTDIR/LSCRIPTDIR thingy in tigercron was a first attempt to do this :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]