Welcome, Guest. Please login or register.

Author Topic: Linux s:user-startup  (Read 5359 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline dfreniche

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 87
    • Show all replies
    • http://blog.freniche.com
Re: Linux s:user-startup
« on: August 25, 2007, 05:31:31 PM »
Those scripts in turn launch daemons. in UNIX, a daemon is a service that runs in the background, providing a... well, a service. Examples are apache (the web server), dhcpd, etc.
If you see in UNIX (or MacOS, by the way, try Terminal in Finder, then ps -aux) anything ending in 'd', you can tell that's a daemon.
A1200D(Blizzard 68030,32MB,Wifi,IdeFix,CDROM), A1200D(Apollo 68030,8MB),A600,A500
I maintain a site on everything, Amiga too (in Spanish)
Regards to all amiga fans!   :-)
 

Offline dfreniche

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 87
    • Show all replies
    • http://blog.freniche.com
Re: Linux s:user-startup
« Reply #1 on: August 25, 2007, 05:41:16 PM »
In Linux you have runlevels. A runlevel simply defines a group of scripts to be launched at startup. Say you run at runlevel 1. Then, your Linux system will execute all scripts in /etc/rc1.d.
If you have a closer look at /etc, you have the /etc/rc?.d directories. One for every runlevel, from 0 (shutdown) to 6 (reboot). This is the way a SYSTEM V UNIX should work. In those dirs you only have links to the real scripts, stored at /etc/init.d. To add a script in, say, rc3.d,:
cd /etc/rc3.d
ln -s /etc/int.d/
The scripts in /etc/rc?.d have a 'S' or a 'K' and a number. The number is an order number. The S means Start (to be executed when the system fires up) and K means Kill (Stop when the runlevel in ending)
After all this theory, really, the equivalen to User-Startup in the file .bashrc found in your $HOME dir. The other are the equivalent to Startup-Sequence
A1200D(Blizzard 68030,32MB,Wifi,IdeFix,CDROM), A1200D(Apollo 68030,8MB),A600,A500
I maintain a site on everything, Amiga too (in Spanish)
Regards to all amiga fans!   :-)
 

Offline dfreniche

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 87
    • Show all replies
    • http://blog.freniche.com
Re: Linux s:user-startup
« Reply #2 on: August 25, 2007, 10:59:25 PM »
@ptek
I love being a newbie. It's the only state of mind where you want to learn things all the time. I'm Amigan just since 2005 but I've used various flavours of MSDOS, Win, Linux, other UNIXes and MacOS. Why use only one system if you can try a bunch?
That said, i use Linux for everyday work and at home. It makes me feel comfortable. AmigaOS shocked me when I first try multitasking in an A500 unexpanded. I can connect it to my Linux box via serial port ! Then the frenzy started and now I own an A1200, an A600 and the 500. And use them everyday.
One of the biggest problems of "experts" is they take people out of their systems. If I start barking at someone for a basic Linux question, why anyone here should treat me with respect?
A1200D(Blizzard 68030,32MB,Wifi,IdeFix,CDROM), A1200D(Apollo 68030,8MB),A600,A500
I maintain a site on everything, Amiga too (in Spanish)
Regards to all amiga fans!   :-)
 

Offline dfreniche

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 87
    • Show all replies
    • http://blog.freniche.com
Re: Linux s:user-startup
« Reply #3 on: August 27, 2007, 02:55:23 PM »
@murple
Not sure about the .d question. That's vital to me!
In the Debian tutorial is clear: everything ending in d is a Daemon.

Quote
Note all the commands ending in d --- such as kflushd and inetd --- the d stands for daemon[7]. A daemon is a non-interactive process, that is, it's run by the system and users never have to worry about it. Daemons provide services like internet connectivity, printing, or email.


The link to the quote

By the way, a daemon is a"Disks And Extensions MONitor" :-)

So .d maybe is a reminder of history and evolution of UNIX. In those times, it was hard to send a ls -l and watch the teletype printing. Maybe the .d was used to make clear the dirs... but it's used mostly on dirs where daemon config files resides  :lol:
...as it was discussed here
A1200D(Blizzard 68030,32MB,Wifi,IdeFix,CDROM), A1200D(Apollo 68030,8MB),A600,A500
I maintain a site on everything, Amiga too (in Spanish)
Regards to all amiga fans!   :-)
 

Offline dfreniche

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 87
    • Show all replies
    • http://blog.freniche.com
Re: Linux s:user-startup
« Reply #4 on: August 27, 2007, 10:17:48 PM »
@Piru
Ok, lets blame on the Debian guys !  :-)
...and using
# find / -iname "*d"
is cheating !  :-D

I think in the tutorial they are talking about processes and not programs (you know, a process is a running instance of a program blah, blah).
But you're right, it's not expressed exactly as it is.

And the .d question. I know UNIX evolve from single file configuration (examples are /etc/inittab, /etc/passwd, /etc/group, ...) to multiple file configuration in SYSTEM V. So maybe the .d stands for "directory with configs" or "directory with configs plus daemons".

Are there any venerable UNIX Gurus (>20 years experience) that can help us with the .d mystery ? :-P
A1200D(Blizzard 68030,32MB,Wifi,IdeFix,CDROM), A1200D(Apollo 68030,8MB),A600,A500
I maintain a site on everything, Amiga too (in Spanish)
Regards to all amiga fans!   :-)
 

Offline dfreniche

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 87
    • Show all replies
    • http://blog.freniche.com
Re: Linux s:user-startup
« Reply #5 on: August 29, 2007, 02:57:03 PM »
Quote
Well, many *programs* that end in d are daemons... for example, crond or dhcpd. Not all daemons end in d though, for example sendmail. And certainly many things end in d which are not daemons, for example sed or ld. Things that end in .d are NEVER daemons, but are configuration directories for the most part... For example, /etc/profile.d has nothing to do with daemons. In fact I would probably go as far as to say that most directories ending in .d are not daemon related.

In my /etc, these are not daemon related: bash_completion.d, dev.d, gre.d, ld.so.conf.d, libpaper.d, logrotate.d, lsb-release.d, makedev.d, modprobe.d, pam.d, profile.d, readahead.d, reader.conf.d, rwtab.d, sane.d, setuptool.d, and yum.repos.d

And these ARE daemon related: cron.d, init.d, rc*.d, netplug.d and xinet.d

I suspect .d is for "default."


Ok. As I answered to Piru, let's Blame the Debian help author. :-D
UNIX is inconsistent in many ways. Maybe the .d issue is just another symptom of a 30 years' old OS.

Quote

Daemons, under the Linux File System Standard, will generally be located in /sbin or /usr/sbin, and while many daemon program names end in d, many do not. While daemon CONFIGS will be in /etc, no daemon or other program should be in /etc (not counting executable scripts).


OK. That's described in the FHS. I agree.

Quote

Quote
daemon is a"Disks And Extensions MONitor"


Uhh, no. That is absolutely not true. A daemon is a background system process that does stuff, and comes from the Greek word for servant.



That is absolutely half true. Look a the WikiPedia definition of daemon. Both are valid.

http://en.wikipedia.org/wiki/Daemon_(computer_software)

Quote

Just a quick glance at that Debian help file tells me you ought to go read the TLDP stuff instead. Not that the Debian file is wrong, but its not very clear and has some things that will be confusing to newbies.

You can tell much more about what kind of file a program is by where it is. The filesystem has a pretty clear structure that is defined in a standards doc. Search the net for Linux filesystem standard.

Ooops! That sound me kind of RTFM ! :lol:
Ok, but I've not seen the .d issue covered anywhere Googling around. I know it's not that important, simply wanted to know why the ".d". I'm using Linux (and previously MINIX and a little AIX) since 1994. I don't consider myself a Linux newbie  :lol:  
A1200D(Blizzard 68030,32MB,Wifi,IdeFix,CDROM), A1200D(Apollo 68030,8MB),A600,A500
I maintain a site on everything, Amiga too (in Spanish)
Regards to all amiga fans!   :-)