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. |
put it in /etc/rc.local
|
no such file/directory.
Code:
[kayla@localhost ~]$ d /etc/rc.* |
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. |
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. |
d? what's d? an alias for ls -d? /etc/rc.local is a *FILE* not a directory.
|
Quote:
|
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.
|
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".
|
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.
|
Quote:
|
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 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. |
All times are GMT -5. The time now is 07:47 PM. |