Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
init.d script tutorial primer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
TheLexx
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2005
Posts: 137
Location: Austin Tx

PostPosted: Wed Apr 17, 2013 9:50 pm    Post subject: init.d script tutorial primer Reply with quote

I'm looking for a good tutorial/primer for /etc/init.d/ scripts development. I have two different projects involving init.d scripts and I would like them to be compliant with Gentoo "standards".

My more ambitious project is to write an init.d script from scratch called rootscreen. When "/etc/init.d/rootscreen start" is called (possible at boot), the program screen is initiated with a number of windows. Each window would have a different program running in it.

My Simpler project is just to adjust the dependencies of sshd. My Laptop does not have a net device "eth0" (unless the usb-ethernet device is plugged in). It might seam strange, but I often ssh through the loopback interface. I would like to change it so that, sshd is only dependant on "lo" and not "eth0" being up and running.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Thu Apr 18, 2013 12:06 am    Post subject: Reply with quote

The section in the Gentoo Handbook on writing initscripts is quite helpful: Part 2, Chapter 4. Initscripts.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Apr 18, 2013 4:05 pm    Post subject: Reply with quote

TheLexx ...

The following should work arround sshd needing net (untested)

/etc/rc.conf
Code:
rc_sshd_need="!net"

HTH & best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum