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

Re: Determining if system has multiple processors in %post section



> In the %post section I need to determine how many processors my system has.
> If there is one processor I will install my recompiled kernel, otherwise
> I'll let the default be the smp-kernel.  I thought I could grep the
> /proc/cpuinfo file to determine the number of processors but during
> kickstart it only shows one processor even though my system has two.  The
> file doesn't seem to get updated with information for the second processor
> until the system boots into the smp-kernel.  Any thoughts/hints on how I
> could determine the number of processors in the system?  How does anaconda
> automagically know when there are multiple processors?

Answering more generally, there are many reasons to want to
run some commands when the systems is rebooted. In that direction,
many of us prepare a script that is only run while the system reboots
for the first time. For example, this is when we ask for root
password to the user (before that, we have a password that they
don't know), we only patch network files or install additional
packages, etc. The script is simply put in /etc/init.d and a link
in /etc/rc3.d. After execution, the script deletes itself.
Maybe you could use that strategy.

				Anne
-- 
 Anne Possoz   Service Informatique Central 
Ecole Polytechnique Federale de Lausanne, 1015 Lausanne (Switzerland)






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