Skip to Content.
Sympa Menu

sm-spell-submit - [SM-Spell-Submit]for testing: init.d spell

sm-spell-submit AT lists.ibiblio.org

Subject: Submit list for new spells

List archive

Chronological Thread  
  • From: nealbirch <nealbirch AT attbi.com>
  • To: Treeve Jelbert <treeve01 AT pi.be>
  • Cc: sm-spell-submit <sm-spell-submit AT lists.ibiblio.org>
  • Subject: [SM-Spell-Submit]for testing: init.d spell
  • Date: Mon, 23 Sep 2002 20:17:51 -0400

Treeve Jelbert wrote:

Thanks for testing this! I didn't want commit it till it had been tested more. I want to make it as error free as I can, since it affects the mount file.

Building
init.d

ls: /var/lib/sorcery/mygrim /var/lib/sorcery/codex/devel: No such file or directory

Not sure what this is about here... did you have a link in your codex ?

Using gcc version: 3.2
installing in dir:/usr/src
init.d 1
ln: creating symbolic link `/etc/rc0 6.d/K90mount' to `/etc/init.d/mount.sh': No such file or directory
ln: creating symbolic link `/etc/rc3 4 5.d/S30networking' to `/etc/init.d/networking.sh': No such file or directory
ln: creating symbolic link `/etc/rc0 1 2 6.d/K70networking' to `/etc/init.d/networking.sh': No such file or directory

There is a bug in line 13 of build, it reads currently:

ln -s /etc/init.d/$1 /etc/rc"$level".d/$pri$truncname

and should read:

ln -s /etc/init.d/$1 /etc/rc$level.d/$pri$truncname

The variable "$level" (quoted) reads the expression:

$(grep "# $action" /etc/init.d/$1 | cut -d: -f2)

as the string of variables, where as $level is read properly as the variable used for the "for variable in variables do" statement. I apparently forgot that the quotes have bash behave differently in that context, another sign that I shouldn't code continually for 6 hrs.

Fixed in attached.

Working on having it detect network cards by itself (!) on a working system and a dialog interface otherwise.
something like:
if query "Is your network card working properly now?" y; then
if [ -e /sbin/ifconfig ]; then
for nic in $(ifconfig |grep ^[[:alpha:]]|awk '{ print $1 }')
do
if [ ! $nic = lo ]; then
ip=$(ifconfig $nic |grep inet|awk '{print $2 }'|cut -d: -f2)
etc, etc...

Need to figure out how to get the kernel module of the nic though... probably something simple.

---
"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

Attachment: init.d.tar.bz2
Description: Binary data




Archive powered by MHonArc 2.6.24.

Top of Page