You are not logged in.
Pages: 1
Topic closed
Why does Arch place startup scripts into /etc/rc.d instead of /etc/init.d?
I'm not complaining -- I really like the Arch init system. And I realize that it is very different from the init scripts used by other distributions. But is there a reason that the directory name has to be different? While the FHS is silent about where init scripts have to go, it seems to me that almost every other distro puts the initialization stuff in /etc/init.d/
When I come home from work (we run Fedora in the lab and my desktop at work is openSuSE), I find myself typing /etc/init.d/blah instead of /etc/rc.d/blah all the time. For awhile I just symlinked /etc/init.d to /etc/rc.d on my Arch box, but that seemed kind of hacky. Is there any reason not to do this?
Offline
Might want to read up on System-V vs BSD style INIT
Offline
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
When I come home from work (we run Fedora in the lab and my desktop at work is openSuSE), I find myself typing /etc/init.d/blah instead of /etc/rc.d/blah all the time. For awhile I just symlinked /etc/init.d to /etc/rc.d on my Arch box, but that seemed kind of hacky. Is there any reason not to do this?
I always symlink the opposite when I have to maintain boxes that use init.d - I find myself typing /etc/rc.d/ too readily
Offline
atomopawn wrote:When I come home from work (we run Fedora in the lab and my desktop at work is openSuSE), I find myself typing /etc/init.d/blah instead of /etc/rc.d/blah all the time. For awhile I just symlinked /etc/init.d to /etc/rc.d on my Arch box, but that seemed kind of hacky. Is there any reason not to do this?
I always symlink the opposite when I have to maintain boxes that use init.d - I find myself typing /etc/rc.d/ too readily
Me too... But we have around 160 disparate Fedora-based boxes and symlinking on all of them just for me isn't practical. Gives me the $h!ts ![]()
(But I like rc.d too much. I refuse to link init.d to rc.d on my Arch machines
)
Last edited by fukawi2 (2008-12-16 23:29:13)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Interesting. I didn't realize we were using a BSD-style init system. I'd assumed it was a custom one like Gentoo uses. I guess it's been too long since FreeBSD was my main platform.....
It does seem a little . . . dirty . . . to symlink things. But it sounds like there is no practical reason not to do it, just historical ones. Unfortunately for me the reverse symlink won't work on my gentoo boxes (they use BOTH rc.d and init.d).
Thanks for all the input folks. Reading about BSD-style init has been interesting. (I personally can't see why anyone would use anything else!)
Offline
well being a RHEL and CentOS sysadmin i constantly find myself typing "service bla start" or "chkconfig bla on" and get really frustrated when that doesnt work, from what I read Ubuntu is starting to understand those typo's and in 8.10 they have added the "service" command. Although i do not use it for my desktop i really love the RHEL way of administering things. I must admit that canonicals 'upstart' as an init replacement also shows a lot of promise, if onyl it were used properly and not in bacwards compatibility mode.
stefan
Last edited by stefan1975 (2008-12-17 18:19:56)
"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998
Offline
well being a RHEL and CentOS sysadmin i constantly find myself typing "service bla start" or "chkconfig bla on" and get really frustrated when that doesnt work...
stefan
Just add /etc/rc.d/ to your $PATH on your Arch boxes.
..how often this simple solution eludes us... ![]()
Offline
Just add /etc/rc.d/ to your $PATH on your Arch boxes.
..how often this simple solution eludes us...
But there's still no service command...?
I put this in to my global bashrc file when I first moved from being familiar with RHEL / Fedora
service() {
sudo /etc/rc.d/$1 $2
}Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Hmm, I am a bit puzzled.
If the 'service' command is used in the context cited above, like
service hal startjust add /etc/rc.d/ to $PATH and do
hal startor
network restartetc
?
Offline
Yes, that will work too... Depending on what order you path is in (ie, sshd is in /usr/sbin/sshd and /etc/rc.d/sshd)
/etc/rc.d would need to be before /usr/sbin which might break things...
They both work - I was just including the `service` part to mimic RH / Fedora verbatim ![]()
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Yes, that will work too... Depending on what order you path is in (ie, sshd is in /usr/sbin/sshd and /etc/rc.d/sshd)
/etc/rc.d would need to be before /usr/sbin which might break things...
They both work - I was just including the `service` part to mimic RH / Fedora verbatim
Ah.
Well, one less word to type. ![]()
Offline
I add 3 aliases to .bashrc: start, stop, and restart. So I would type something like 'restart mpd'. It requires less typing fukawi2's solution and less hacks than Misfit138's. It's also closer to natural English. I may have gotten this from another archer's bashrc, I don't remember who, but the credit isn't mine.
Last edited by fflarex (2008-12-17 22:00:46)
Offline
For you Red Hat'ers and you CentOS'ers try this:
function service() { /etc/rc.d/$1 $2 }in your dot shell rc
nvm. someone already suggested.
Last edited by rson451 (2008-12-17 22:12:31)
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
I add 3 aliases to .bashrc: start, stop, and restart. So I would type something like 'restart mpd'. It requires less typing fukawi2's solution and less hacks than Misfit138's. It's also closer to natural English. I may have gotten this from another archer's bashrc, I don't remember who, but the credit isn't mine.
I like this.
Thanks, I would never have considered it.
Offline
I add 3 aliases to .bashrc: start, stop, and restart. So I would type something like 'restart mpd'. It requires less typing fukawi2's solution and less hacks than Misfit138's. It's also closer to natural English. I may have gotten this from another archer's bashrc, I don't remember who, but the credit isn't mine.
I'm not sure how I'm supposed to do this?
alias start=/etc/rc.d/
alias stop=/etc/rc.d/
alias restart=/etc/rc.d/
? If you're supposed to be able to write simply "stop mpd", how do you alias it so it understands that the second word should be inserted between "rc.d/" and " stop", effectively translating it to "/etc/rc.d/mpd stop"?
Offline
fflarex wrote:I add 3 aliases to .bashrc: start, stop, and restart. So I would type something like 'restart mpd'. It requires less typing fukawi2's solution and less hacks than Misfit138's. It's also closer to natural English. I may have gotten this from another archer's bashrc, I don't remember who, but the credit isn't mine.
I'm not sure how I'm supposed to do this?
alias start=/etc/rc.d/
alias stop=/etc/rc.d/
alias restart=/etc/rc.d/
? If you're supposed to be able to write simply "stop mpd", how do you alias it so it understands that the second word should be inserted between "rc.d/" and " stop", effectively translating it to "/etc/rc.d/mpd stop"?
Don't necrobump: https://wiki.archlinux.org/index.php/Fo … Bumping.27
Closed.
ᶘ ᵒᴥᵒᶅ
Offline
Pages: 1
Topic closed