You are not logged in.
Hello, all:
wiki told me that I could configure many files in /etc.
However, sorry if sounds stupid, I think this is not KISS.
I have to learn many different syntax to configure my computer.
I think put things in /etc/rc.local if possible is a good idea.
For example, We could configure things in this way:
[/etc/rc.conf] DAEMONS=(crond)
[/etc/fstab] /dev/sda3 /home ext4 rw,relatime 0 1
[/etc/modules-load.d/vb.conf] vboxdrv
For a alternate, we could edit /etc/rc.local like this:
rc.d start crond
mount /dev/sda3 /home
modprobe vboxdrv
Now we do not need to learn any new syntax, everything is BASH!
Offline
everything is BASH!
The future is systemd (so it seems), not BASH.
Offline
For example, We could configure things in this way:
...
For a alternate, we could edit /etc/rc.local like this:
..
I think there SHOULD be a problem with this but... I don't see a problem with this. It works in your situation, but of course it wouldn't for everyone. For example, I assume if something on /home was needed during boot then you would need to load it earlier in /etc/fstab.
I'll probably end up doing it the first way just to be more "correct". I do already have some stuff in /etc/rc.local, such as setting up soft links to my disc drives.
The future is systemd (so it seems), not BASH.
Bash isn't going away any time soon. Are you suggesting that /etc/rc.local will be going away?
Offline
For example, I assume if something on /home was needed during boot then you would need to load it earlier in /etc/fstab.
That would be the main thing - rc.local is the very last thing run, so you're going to have to duplicate a lot of functionality if you're going to do more than mount a drive or two or start a single daemon. Furthermore, as you noted, there are things that are simply expected to be there relatively early (such as fstab entries for important drives).
In the end, without a lot of infrastructure changes I think all you'll accomplish by sticking things in rc.local is adding yet another config file to check and, depending on what exactly you're doing, causing possible breakage It's not a bad thought though.
Offline
You'll essentially be reimplementing rc.sysinit, just hardcoding everything. It will work, but I don't think it is a very good idea
Offline
brebs wrote:The future is systemd (so it seems), not BASH.
Bash isn't going away any time soon. Are you suggesting that /etc/rc.local will be going away?
That depends on the user. Pure systemd setup:
==[ READY FOR INPUT ]==
>>> cat /etc/rc.local
cat: /etc/rc.local: No such file or directory
Offline
Yeah, in systemd there is no more rc.local function. That isn't to say you could not set it up to run it if you wanted to. In fact I had it set up like that while I worked out how to set up the various unit files to set it the right way. Essentially, you are supposed to write *.service files with systemd to run things that you would have otherwise put in rc.local in SysV. It isn't hard once you get it all figured out, and it seems to do much better in that it handles all the dpendency stuff and parallelling better.
So yes, rc.local is going away (if the move to systemd is the path taken, either by choice or eventually by default)
Offline
Why not have a service file having
ExecStart=/etc/rc.local
come with the default units? In addition to being tedious, doing it Lennart's way on my system would be impossible because my rc.local does more than call isolated commands. It's a script with if statements... imagine that.
EDIT: Oh, I see there already is one that you can copy to enable.
Last edited by ConnorBehan (2012-09-01 01:28:06)
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline