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 |
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-31-2013, 03:47 PM
|
#1
|
|
Senior Member
Registered: Dec 2005
Posts: 1,384
Rep: 
|
Fedora18 want to run a script at end of boot cycle. HOW?
i have a simple script to test if the laptop is at home and if it is then to mount the local NFS share. I tried putting it in /etc/rc.d/init.d/ that did not work.
i have tested the script it runs fine when manually run and by putting the script in /etc/rc.d/init.d i can run service foo start and it works great.
sadly I didnt create it for that as it does not have an option to umount the share so i cant service foo stop. not a big deal, but again not my goal. I want this script to run at the end of the boot up so my daughter does not have to fight with the system to get access to the home NFS.
i have tried adding it to fstab and using autofs, both give all kinds of issues and errors. mainly permissions as F18 does not like running and connecting to NFSv3.
thanks in advance.
|
|
|
|
01-31-2013, 03:48 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
put it in /etc/rc.local
|
|
|
|
01-31-2013, 03:54 PM
|
#3
|
|
Senior Member
Registered: Dec 2005
Posts: 1,384
Original Poster
Rep: 
|
no such file/directory.
Code:
[kayla@localhost ~]$ d /etc/rc.*
total 48
drwxr-xr-x. 10 root root 4096 Dec 7 16:31 ./
drwxr-xr-x. 145 root root 12288 Jan 31 16:53 ../
drwxr-xr-x. 2 root root 4096 Jan 31 16:30 init.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc0.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc1.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc2.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc3.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc4.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc5.d/
drwxr-xr-x. 2 root root 4096 Dec 25 11:35 rc6.d/
Last edited by lleb; 01-31-2013 at 03:56 PM.
|
|
|
|
01-31-2013, 09:49 PM
|
#4
|
|
Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 651
Rep: 
|
Unfortunately, unless you modify the configuration for rc.local it will run BEFORE the system is up.
You have to run it AFTER the network is ready... and that can vary all over the place.
Fedora no longer has a valid sysV init system. It just runs them willy-nilly.
|
|
|
|
01-31-2013, 11:05 PM
|
#5
|
|
Senior Member
Registered: Dec 2005
Posts: 1,384
Original Poster
Rep: 
|
from reading it has replaced sysV with systemd. ill be working with my LUG this weekend to get the issue resolved. its more about me not understanding Fedora 18 and the way it handles all of the changes for networking to my house NFS server.
Thank you for the help. Ill post back after Sat. with how things are resolved.
|
|
|
|
02-01-2013, 02:10 AM
|
#6
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
d? what's d? an alias for ls -d? /etc/rc.local is a *FILE* not a directory.
|
|
|
|
02-01-2013, 05:49 PM
|
#7
|
|
Senior Member
Registered: Dec 2005
Posts: 1,384
Original Poster
Rep: 
|
Quote:
Originally Posted by acid_kewpie
d? what's d? an alias for ls -d? /etc/rc.local is a *FILE* not a directory.
|
sadly im not 100% sure. when i get the info tomorrow at my LUG, ill be more then happy to post it here. all i know is that it is something new with Fedora 18 as sysV has been depreciated.
|
|
|
|
02-02-2013, 02:27 AM
|
#8
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
huh? no, you ran a command called "d", surely that's nothing to do with init scripts, you're just listing directories, no? /etc/rc.local should still be a writable file.
|
|
|
|
02-02-2013, 05:13 AM
|
#9
|
|
Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 651
Rep: 
|
He is referring to systemd - a hodge-podge merger of init, inetd, dbus, and udev. The SysVinit system does not exist except in name only. All init scripts run at any time after root is mounted, and in parallel with all other setup functions. It is roughly controlled by creating explicit dependency lists in dozens of configuration files describing each facility being started. If you have something that needs the network, then it must be run after the network is "ready"... Unfortunately, that depends on how the network is started... NetworkManager by default marks it "ready" when it has started... and unless another wait point is marked (NetworkManager-wait-online) then it might not actually be ready. Even then, if the network depends on wireless it may still not be "quite ready".
|
|
|
1 members found this post helpful.
|
02-02-2013, 06:17 AM
|
#10
|
|
Senior Member
Registered: Dec 2005
Posts: 1,384
Original Poster
Rep: 
|
ahh thank you, that sounds a bit like what one of the guys at my LUG was telling me via e-mail. im about to head off to my boys pine-wood-derby, then shortly after the LUG meeting for an install fest. there we will be working on both the laptop and my server as I shall be learning about what you just talked about jpollard.
|
|
|
|
02-02-2013, 06:24 AM
|
#11
|
|
Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian Lenny (5.0), Squeeze (6.0), Wheezy (7.0), Sid (unstable)
Posts: 271
Rep:
|
Quote:
Originally Posted by acid_kewpie
put it in /etc/rc.local
|
That should be 'edit and add to /etc/rc.local'.
Last edited by goumba; 02-02-2013 at 06:39 AM.
|
|
|
|
02-02-2013, 09:19 PM
|
#12
|
|
Senior Member
Registered: Dec 2005
Posts: 1,384
Original Poster
Rep: 
|
well sadly I didnt get to "learn" as I had hopped due to time. the guy setup idmapper as well as some other kind of automounter that while is not a symlink nor a loopback it kind of works like that. sorry i sound like an idiot and that is because i truly am not sure exactly what he did.
without moving the files around he was able to change the pathing so now my NFS share resides in /home/ssmahome/public instead of /home/ray/NFS making it simpler for clients to connect.
He also was successful at setting up both NFSv3 and NFSv4 on my server to make mounting simpler on my Fedora 18 laptop without breaking the MACs that do not play nice with NFSv4.
Code:
$ cat /etc/exports
#
# /etc/exports
# NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)
# NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
#NO#HOMEDIRS# /exports/centos *(rw,insecure,no_subtree_check,fsid=3000)
[ray@centos TV_Shows]$ d /home/
total 12
drwxr-xr-x. 4 root root 4096 Feb 2 16:15 ./
dr-xr-xr-x. 26 root root 4096 Feb 2 16:18 ../
lrwxrwxrwx. 1 root root 15 Feb 2 10:00 julian -> ssmahome/julian/
lrwxrwxrwx. 1 root root 12 Feb 2 10:00 ray -> ssmahome/ray/
drwxr-xr-x. 7 root root 4096 Feb 2 10:04 ssmahome/
drwxr-xr-x. 2 root root 0 Feb 2 16:18 win7/
[ray@centos TV_Shows]$ d /home/ssmahome/
total 60
drwxr-xr-x. 7 root root 4096 Feb 2 10:04 ./
drwxr-xr-x. 4 root root 4096 Feb 2 16:15 ../
drwx------. 2 julian julian 4096 Jan 4 15:49 julian/
drwx------. 2 kayla kayla 4096 Feb 2 10:04 kayla/
drwx------. 2 root root 16384 Jan 4 14:38 lost+found/
drwsrwxrwx+ 9 ray ray 20480 Feb 2 16:25 public/
drwx------. 13 ray ray 4096 Feb 2 16:45 ray/
nice bit of work he did. we did discover a bug in Fedora 18's idmapper as it is supposed to send across the user name, not the UID. it is sending only the UID/GID instead of the User_name/Group_name.
in other words it is sending 1000:1000 instead of kayla:kayla this is breaking permissions for getting into the users home directory on the server. He is going to research it further this weekend and either get with me to fix it if he finds a fix, or post a bug-zilla report to the Fedora community.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:32 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|