LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2008, 04:28 PM   #1
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
How to implement this script without "devfsd"?


How to implement this script without "devfsd"?

# loop rescanning the scsi bus + rerunning devfsd
retries=5
i=1
until [ -e $REAL_ROOT ]
do
if [ $i -gt $retries ]
then
echo "Unable to mount real root ($REAL_ROOT) - Giving up!"
/bin/ash
exit
fi

echo "Real root ($REAL_ROOT) not found, retrying ($i)"
sleep 1
echo "scsi add-single-device 0 0 0" > /proc/scsi/scsi
echo "scsi add-single-device 1 0 0" > /proc/scsi/scsi
echo "scsi add-single-device 2 0 0" > /proc/scsi/scsi
/bin/devfsd /dev -np
i=$((i+1))
done
 
Old 05-09-2008, 03:30 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Remove the line containing "devfsd"..

If you're trying to implement something, it's in your interests to tell us what you're trying to do..
 
Old 05-11-2008, 05:43 AM   #3
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
Question

Thank you for the comment. I am new to Linux and new to the forum.

Does that work? I do not know what this script does. That is why I posted it to LQ. Someone gave me this solution from LQ. I am asking for a different way to implement that command. Someone must understand what that command does in the script and could tell me another way to do it.

Could someone tell me what it does and another way to do it? The command was there for some function that I do not understand.

# loop rescanning the scsi bus + rerunning devfsd

Quote:
If you're trying to implement something, it's in your interests to tell us what you're trying to do..
I am trying to find another way to implement the script without using devfsd. I thought my question was clearly written. Do you know what this script does and how to implement it without devfsd? Deleting devfsd is not a solution to my question!
 
Old 05-11-2008, 06:13 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by newtovanilla View Post
I am trying to find another way to implement the script without using devfsd. I thought my question was clearly written. Do you know what this script does and how to implement it without devfsd?
No. It is not possible to know exactly what this script do. We can only try to interpret the semantic, not the actions performed by this script if we don't know the context. Furthermore, it looks like a part of a more complex script, since the variable REAL_ROOT is not assigned anywhere.

Anyway, devfsd is a daemon for managing the device entries in the Linux Device Filesystem. It is an obsolete feature now substituted by udev in the recent kernels.
 
Old 05-17-2008, 07:26 PM   #5
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
The context for the script is in the original post. There should be enough in the script to understand what it does and to find another way to do it, if you know scripting. I do not know scripting, so that is why I posted this question. After looking on the web, it seems to me that it does not matter what the variable REAL_ROOT is, as long as it is defined. One of the posts on LQ said that you can get its value with the command "echo $REAL_ROOT".

It is off topic to explain where this script came from. If you want to know about that, look at all my other posts in LQ!

Quote:
It is an obsolete feature now substituted by udev in the recent kernels.
That is why I am asking to find another way to do this script! Does someone understand what this script does and how to implement it in recent kernels that do not use "devfsd"?
 
Old 05-17-2008, 07:46 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by newtovanilla View Post
It is off topic to explain where this script came from. If you want to know about that, look at all my other posts in LQ!
It sounds a little pretentious to ask people look at your LQ history, instead of explaining a little more in your newly opened thread. If it is related to your previous threads, continue to post there, don't start a new one pretending people knows what you're talking about or what you have in mind!
 
Old 05-18-2008, 04:47 PM   #7
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
From the other posts, this is what I am trying to do. Does this help you to tell me another way to do the script?

I was told to start new posts if I have new questions! I did what I was told by LQ members.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 02:03 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 08:42 AM
Could you implement a "search" for subscribed threads JZL240I-U LQ Suggestions & Feedback 3 08-22-2006 11:15 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 03:32 PM
IS there a way to implement a weekly "downloading quota"? linux-addict Linux - Networking 9 01-13-2004 11:42 AM


All times are GMT -5. The time now is 10:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration