Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] New init scripts for testing and feedback

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: nealbirch <nealbirch AT attbi.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] New init scripts for testing and feedback
  • Date: Tue, 17 Sep 2002 22:48:25 -0400

Eric Sandall wrote:
Am I wrong in thinking this should wait till after a reboot
into the new kernel? I'm just wondering if it would be simpler to dispel
those things until after the usual rebuild cleanup and reboot into new
kernel, then recast those things which are dependent on that new kernel.


Sounds a lot like solutions from M$. :)

=P

Anyways, it is true that some
things (alsa-drivers, lm_sensors, etc.) need to be compiled after you have
booted into the new kernel. We talked a little about this before, but no
solution presented itself.

I keep looking at /etc/init.d/sorcery.sh and wondering what the heck it's doing in there if we don't use it.

#!/bin/sh
# /etc/init.d/sorcerer.sh

if [ -x /usr/sbin/sgl.install ]; then
/bin/rm -f /usr/sbin/sgl.install 2> /dev/null ||
/usr/sbin/sgl.install
fi

#end /etc/init.d/sorcerer.sh

actually, I don't know what it does at all... if you have execute permissions over the script, delete it?! What the heck is that for? And || is a logical operator. why is it there? Does it do something else?

if [ $condition1 ] || [ $condition2 ]
# Same as: if [ $condition1 -o $condition2 ]
# Returns true if either condition1 or condition2 holds true...

Seems to me we could modify this a bit:

#!/bin/sh
# /etc/init.d/sorcerer.sh

if [ -x /usr/sbin/sgl.install ]; then
/usr/sbin/sgl.install
fi

#end /etc/init.d/sorcerer.sh

and have sgl.install be a script that casts the POST_INSTALL linux modules to install them then delete itself. This would actually be a pretty simple script:

#!/bin/bash
# /usr/sbin/sgl.install
# source the libary files so you can use spell_installed function
version=devel #set to whichever codex
SCRIPT_DIRECTORY=/var/lib/sorcery/codex/$version/kernels/linux/
KERNEL_MODULES=`cat $SCRIPT_DIRECTORY/MODULES`
for KERNELMODULE in $KERNEL_MODULES; do
if spell_installed $KERNELMODULE; then
cast $KERNELMODULE;
fi
done
/bin/rm -f /usr/sbin/sgl.install
# end

or words to that effect...

--
"You can fool some of the people all of the time
--and those are the ones you have to concentrate on!"
GW Bush-- from the N.Y. Times





Archive powered by MHonArc 2.6.24.

Top of Page