LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 12-13-2001, 02:33 AM   #1
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Specific LFS ?


Okee dokee, finegan and the rest who have/are set(ting) up an LFS system, I have a specific question. Assuming (I know some of you have) you are this far or further it's about the rc script code. When writing the rc script there are two lines in seperate places. Here is the code and then the problem:

suffix=${i#/etc/rc$runlevel.d/K[0-9] [0-9] [0-9]}

This is from the most recent 3.1 book. The hash is commenting out the rest of the code from itself to the end of the line as if you were leaving notes and what not yadda yadda...I am wondering if it's a script error even though it's found twice (so far)? Or have I missed something? Thanks for any help. I'm almost done but checking over the code this struck me as not right.
 
Old 12-13-2001, 04:15 AM   #2
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
i think the line is meant to be

suffix=${#!/etc/rc$runlevel.d/K[0-9] [0-9] [0-9]}

which goes to define the shell that the script is interpreted with. if you look at the start of a standard init script, it ususally says #!/bin/sh or something, which defines what to process the script with. if it's a perl script, then you'd need #!/bin/perl at the start etc... i'm not too sure that this is exactly the same kinda thing, but... well... probably related, maybe.
 
Old 12-13-2001, 01:01 PM   #3
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
I really should learn shell scripting better

rc, right?

Okay, yeah, erm... I know that a hash is almost always the start of a comment line, but bash can be bewildering when every character from [ to ' can call something from /bin, but do something different when proceded by another character. I think the # has something to do with calling the parse of all of the different runlevels... erm uh, yeah. Me silly MCSE boy go bang rock against RJ-45 head now.

No, I'm kidding, I would never take the MCSE exam. Okay, maybe at gunpoint, but it would have to be a big gun.

The rc script, unmodified (except for some of the messages), worked perfectly for me. No matter how weird it looks, its kinda hard to argue with that.

Honestly, a good bit of the scripts were voodoo to me. I had to fiddle with them to get everything to work right, but that was largely due to my minimalist kernel. Basically my distro supports Pentium 1s with IDE drives, atapi cdroms, the ext2 file system, the ocasional dos floppy, and a sound card. Hell, I ditched USB, parrallel and erm, I don't know, other stuff I actually have but never use.

Cheers,

Finegan
 
Old 12-13-2001, 02:32 PM   #4
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Original Poster
Rep: Reputation: 45
Well, shucks, I guess i'll let it do it's thing then. I'll be up and running today. I actually pondered writing each script myself, but then I looked at the book printouts I made and said, HELL no! LOL That would take days and i'd end up with but*loads of errors. I wouldn't take the MCSE either...It's expensive, I mean nasty expensive, and they make it so hard I think only 2 in 10 pass on the first round. Not to mention the test is 7 as i remember different tests. Sheesh...No thanks, I'll go Cisco! Hmm RJ-45 head? Does that mean I could use you as a cable extension? LOL Well thanks both for the replies. I am inclined to think blue has something there, but for some reason I still think it would comment out the code. Oh well...Enough talky, more worky...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 05:22 PM
How to make a specific command(s) work in a specific shell only naren_0101bits Linux - Newbie 3 08-28-2005 01:24 PM
Searching a specific directory for a specific extension? RoaCh Of DisCor Linux - Newbie 3 08-13-2005 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration