Jay Taylor's notes
back to listing indextouch /var/lock/subsys/local <<-- Why?
[web search]
Original source (www.linuxquestions.org)
Clipped on: 2017-01-05
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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. |
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4
|
|
|
|
#8 |
bulliver
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4
Rep:
|
Nothing 'checks' for rc.local. It is simply the last rc script run before you arrive at a login prompt when booting...therefore, it is a good place to put commands you need run at boot that don't warrant their own full-blown rc script.
|
|
|
#9 |
cl2imson
LQ Newbie
Registered: Feb 2004
Location: Norman, OK
Distribution: Fedora, Core 2
Posts: 23
Original Poster Rep:
|
hmmm, maybe beter put like this.
rc.local is the last script run by init. within that script (at least fc2) is the command Code:
touch /var/lock/subsys/local what i would like to know is what app would look for that file (./local) to be in that (var/lock/sybsys/) directory? i do understand the workings of rc.local now though. |
|
|
#10 |
bulliver
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4
Rep:
|
I see what you mean. To tell the truth I don't think anything looks there. I have never seen a lock mechanism in place for the rc.local script. Like I was saying, usually it is only used for bigger services. However, it is usually checked by the script itself.
If you have a look at one of your more complicated rc scripts you may see in the 'start' function something like (pseudo code): Code:
start() { if /var/lock/subsys/myapp exists; then echo "myapp already started" exit else touch /var/lock/subsys/myapp /command/to/start/myapp fi } |
|
|
#11 |
cl2imson
LQ Newbie
Registered: Feb 2004
Location: Norman, OK
Distribution: Fedora, Core 2
Posts: 23
Original Poster Rep:
|
ah yes i see now.
thank you mr. bull, i preciate de help. have a great weekend! |
|
|
#12 |
dmxjo
LQ Newbie
Registered: May 2009
Posts: 1
Rep:
|
thank you guys for the Questions and the answers really it helped me to understanding rc.local what for ...
|
|
|
#13 |
prh47
LQ Newbie
Registered: Jun 2011
Posts: 6
Rep:
|
Still Helpful After All These Years
Thanks from me, too.
|
|
|
|
|
||||
Thread | Thread Starter | Forum | Replies | Last Post |
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) | phreakshew | Linux - Newbie | 17 | 07-12-2016 03:50 AM |
How does minicom write to /var/lock | Wim Sturkenboom | Linux - General | 2 | 10-26-2005 04:28 AM |
subsys lock? | Travis_NOOB | Fedora | 0 | 09-28-2005 05:51 PM |
/var/lock/subsys/ | stefaandk | Linux - Newbie | 2 | 07-21-2005 08:27 PM |
Error - can't touch touch: /var/lock - filesystem problem? | xanas3712 | Linux - Newbie | 0 | 05-10-2004 06:26 AM |
All times are GMT -5. The time now is 12:49 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 |
|