You are not logged in.

#1 2007-08-15 11:29:54

ndowens
Member
Registered: 2007-08-15
Posts: 39
Website

runlevels

just wondering why arch uses runlevels instead of the init system, personally i like the init(/etc/init.d/) system better. there is no way i bet to use init, insead of runlevel i bet, am i right?


My site: ndowens.tk

Offline

#2 2007-08-15 12:26:51

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: runlevels

Just curious, what for you need the init.d system? Arch users either use runlevel 3 or 5. There is no use for changing them? I use runlevel 3 and then kdm, gdm or xdm in the daemons array.

Offline

#3 2007-08-15 14:31:05

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: runlevels

The runlevels thing is just a design approach.
Unix systems that subscribe to the SysV model use it (like Slackware and Unix AIX) and then there is the BSD model that does not use this format.

As far as technical merits, there is no practical advantage to one or the other (as far as I know).

Here there is an interesting article that may be of some help:
http://www.onlamp.com/pub/a/bsd/2004/11 … asics.html

R.

Offline

#4 2007-08-15 17:48:45

ndowens
Member
Registered: 2007-08-15
Posts: 39
Website

Re: runlevels

thx for the replies


My site: ndowens.tk

Offline

#5 2007-08-16 12:41:05

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: runlevels

ralvez wrote:

The runlevels thing is just a design approach.
Unix systems that subscribe to the SysV model use it (like Slackware and Unix AIX) and then there is the BSD model that does not use this format.

As far as technical merits, there is no practical advantage to one or the other (as far as I know).


Here there is an interesting article that may be of some help:
http://www.onlamp.com/pub/a/bsd/2004/11 … asics.html

R.

Actually, doesn't Slack use BSD style init, like Arch? I realize Slack uses more runlevels than Arch, but I think that they have some SysV folders in their file system, only for program compatibility sake...or am I wrong?

Offline

#6 2007-08-16 14:04:31

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: runlevels

I have not used Slackware since I got into Arch tongue so I do not remember all the details or the way things are these days but Slackware has always been known as the "most Unix like" distribution.

R.

Offline

#7 2007-08-16 17:39:02

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: runlevels

ralvez wrote:

I have not used Slackware since I got into Arch tongue so I do not remember all the details or the way things are these days but Slackware has always been known as the "most Unix like" distribution.

R.

Cool smile

I grabbed this from the Slackware Essentials page:

"The system initialization files are stored in the /etc/rc.d directory. Slackware uses the BSD-style layout for its initialization files as opposed to System V init scripts, which tend to make configuration changes much more difficult without using a program specifically designed for that purpose. In BSD-init scripts, each runlevel is given a single rc file. In System V, each runlevel is given its own directory, each containing numerous init scripts. This provides an organized structure that is easy to maintain.
There are several categories of initialization files. These are system startup, runlevels, network initialization, and System V compatibility. As per tradition, we'll lump everything else into another category."

So it seems that Slack is quite similar to Arch in this regard. smile
I actually like Slack a lot, and I am sure you agree, I wish I had been introduced to it BEFORE I found Arch. Now that I have Arch and pacman, there is simply no reason to use anything else.  wink

Last edited by Misfit138 (2007-08-16 17:40:54)

Offline

#8 2007-08-16 21:57:52

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: runlevels

Yes, I remember that in Slackware we had something like /etc/rc.d/ and inside it directories like rc0.d, rc1.d, etc.
but I did not know that was adapted from the BSD initialization file system.

Yup, no doubt that having Slackware experience will simplify your Arch experience.
The thing I like about Arch though, that I did not find in Slack, is that package management is soooooo simple tongue
which in turn makes the management of the system so much easier.

For instance, if I install a program in Arch and the decide I do not like it, I just do pacman -R program_x but in Slackware, there is no such thing. If the install program has no "make uninstall" feature you must hunt the files down all over the HDD.

R.

Offline

#9 2007-08-17 00:23:24

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: runlevels

Yes, I agree. Arch is so much more of a pleasure to use because it stays out of your way. Slack has a nice makepkg feature, and it also has installpkg, upgradepkg, and removepkg, but they are very manual, especially in comparison to pacman and ABS. smile
I find myself on sourceforge a lot when I use Slackware, just downloading tarballs, making and installing packages. It's too much like real work for me, but interesting in small doses. wink
Slack seems like LFS with a few very very basic packaging tools...but for some reason I still like it. Perhaps because of the cool name and the old traditional sense of the whole thing.

Offline

#10 2008-06-22 22:56:46

ShogunPanda
Member
Registered: 2008-06-22
Posts: 4

Re: runlevels

Hi guys!
I've added a patch to the wiki which add support for runlevels.
Check it out:
Hope it helps! http://wiki.archlinux.org/index.php/Adding_Runlevels


Greetins by the Shogun.
Have fun and enjoy your life!

Offline

#11 2008-06-23 00:29:13

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: runlevels

ShogunPanda wrote:

Hi guys!
I've added a patch to the wiki which add support for runlevels.
Check it out:
Hope it helps! http://wiki.archlinux.org/index.php/Adding_Runlevels

Hi, my knowledge about bash isn't very good, but!

+for i in `cat /proc/cmdline`; do
+    RUNLEVEL=`echo $i | grep ^runlevel | sed -r -e "s#runlevel=(.+)#\1#"`
+done;

This sets RUNLEVEL to nothing, if runlevel= isn't specified at the end of cmdline.
I would have done something like

for i in $(cat /proc/cmdline) ; do
    [[ $i =~ ^runlevel= ]] && eval $i
done

Why don't you post your idea on the forums before next time, so we can all help out and make it better beforehand?

Offline

#12 2008-06-23 02:00:20

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: runlevels

ralvez wrote:

and inside it has directories like rc0.d, rc1.d, etc.

No, it doesn't.

ralvez wrote:

I just do pacman -R program_x but in Slackware, there is no such thing. If the install program has no "make uninstall" feature you must hunt the files down all over the HDD.

No, you do removepkg program_x, and if you compiled something your self you could of used makepkg (just like arch *shock*) or even checkinstall to create a package which you can later remove again with removepkg. Maybe next time you'll actually learn something about a distribution and won't shoot your self in the foot while hunting files.

Last edited by anrxc (2008-06-23 02:03:23)


You need to install an RTFM interface.

Offline

#13 2008-06-23 07:10:42

ShogunPanda
Member
Registered: 2008-06-22
Posts: 4

Re: runlevels

carlocci wrote:
ShogunPanda wrote:

Hi guys!
I've added a patch to the wiki which add support for runlevels.
Check it out:
Hope it helps! http://wiki.archlinux.org/index.php/Adding_Runlevels

Hi, my knowledge about bash isn't very good, but!

+for i in `cat /proc/cmdline`; do
+    RUNLEVEL=`echo $i | grep ^runlevel | sed -r -e "s#runlevel=(.+)#\1#"`
+done;

This sets RUNLEVEL to nothing, if runlevel= isn't specified at the end of cmdline.
I would have done something like

for i in $(cat /proc/cmdline) ; do
    [[ $i =~ ^runlevel= ]] && eval $i
done

I knew that. I did it that 'cause I use uppercase notation for variables.
Apart from using =~ operator instead of grep+sed, the script wouldn't change.
But your hint it's not wrong. Guys, what do you thin? Should I change that?


carlocci wrote:

Why don't you post your idea on the forums before next time, so we can all help out and make it better beforehand?

I'll do next time, i promise! smile


Greetins by the Shogun.
Have fun and enjoy your life!

Offline

Board footer

Powered by FluxBB