public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] new net runlevel
@ 2002-06-30 19:29 Jacob Perkins
  2002-07-01  5:05 ` mbutcher
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Perkins @ 2002-06-30 19:29 UTC (permalink / raw
  To: gentoo-user; +Cc: gentoo-dev

I would like to have a virtual runlevel, let's call it net.  It's going
to be a symlink to either a dsl or dialup virtual runlevel.  The dsl
runlevel will have net.eth0, and the dialup runlevel will have
net.ppp0.  There will be other things in them too, like netmount in
dsl.  I'd like the net runlevel to be started with default so that
something like postfix, which needs net, will start correctly.  How can
I do this?  I tried editing inittab and adding a line to start net, but
if I put it before default, default wouldn't start, and if I put it
after, net wouldn't start and postfix would fail.  I also tried making a
net rc-script, with just a start() that has '/sbin/rc net', but that did
absolutely nothing.  I need help on this asap, thanks.

Jacob





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] new net runlevel
  2002-06-30 19:29 [gentoo-dev] new net runlevel Jacob Perkins
@ 2002-07-01  5:05 ` mbutcher
  0 siblings, 0 replies; 2+ messages in thread
From: mbutcher @ 2002-07-01  5:05 UTC (permalink / raw
  To: Gentoo Dev

There is probably a way to do what you are asking with the init runlevels. It 
might take more effort than it is worth.

I might offer an alternative. You should be able to set your own bootparam and 
add entries to your /boot/grub/menu.lst to pass different bootparams. E.g you 
might have an entry where the kernel line looks like this:

kernel bzImage root=/dev/hda3 myoption=nonetwork

Then at boot time, you would select either the network or the non-network 
boot.

To implement this, you would just customize the desired init scripts to check 
for that flag and initialize accordingly. Init flags get stored in 
/proc/cmdline, so you could grep it to see if the nonetwork flag was set. To 
give you some idea....

#!/bin/bash

if [[ `grep "myoption=nonetwork" /proc/cmdline` ]]; then
    # do whatever you need to do with no network
else
    # do what you need to do with network
fi

Hope that gives you some ideas,

Matt

On Sunday 30 June 2002 01:29 pm, Jacob Perkins wrote:
> I would like to have a virtual runlevel, let's call it net.  It's going
> to be a symlink to either a dsl or dialup virtual runlevel.  The dsl
> runlevel will have net.eth0, and the dialup runlevel will have
> net.ppp0.  There will be other things in them too, like netmount in
> dsl.  I'd like the net runlevel to be started with default so that
> something like postfix, which needs net, will start correctly.  How can
> I do this?  I tried editing inittab and adding a line to start net, but
> if I put it before default, default wouldn't start, and if I put it
> after, net wouldn't start and postfix would fail.  I also tried making a
> net rc-script, with just a start() that has '/sbin/rc net', but that did
> absolutely nothing.  I need help on this asap, thanks.
>
> Jacob
>
>
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-01  4:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-30 19:29 [gentoo-dev] new net runlevel Jacob Perkins
2002-07-01  5:05 ` mbutcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox