Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29743 - Managing more than one network profile and adding general profile support by changing two things in baselayout
Summary: Managing more than one network profile and adding general profile support by ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66472
  Show dependency tree
 
Reported: 2003-09-27 06:50 UTC by Kai Lindenberg
Modified: 2005-08-01 03:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Lindenberg 2003-09-27 06:50:58 UTC
This is a just a proposal for adding general profile support. I use runlevel 4
for managing different profiles including different network setups. This is done
by having the line 

l4:4:wait:/sbin/rc $PROFILE

in /etc/inittab. The variable is set at the boot prompt with grub. Now I can
choose between many more runlevels than it is possible with init.

grub.conf:
title dhcp
kernel /vmlinuz 4 root=xxx PROFILE=dhcp

title home
kernel /vmlinuz 4 root=xxx PROFILE=home

title linux5
kernel /vmlinuz 4 root=xxx PROFILE=linux5

But to use my laptop in different networks, I had to change the line in
/sbin/runscript.sh, where the net configuration is sourced:

54c54
[ "${NETSERVICE}" = "yes" ] && source "$(add_suffix /etc/conf.d/net)"
---
[ "${NETSERVICE}" = "yes" ] && source "$(add_suffix etc/conf.d/${myservice%.*})"

The different network init scripts are
/etc/init/net.dhcp.eth0
/etc/init/net.home.eth0
/etc/init/net.linux5.eth0

with the corresponding configuration files
/etc/conf.d/net.dhcp
/etc/conf.d/net.home
/etc/conf.d/net.linux5

My runlevels are:
/etc/runlevels/boot/
/etc/runlevels/default/
/etc/runlevels/dhcp/
/etc/runlevels/home/
/etc/runlevels/linux5/
/etc/runlevels/noX/
/etc/runlevels/nonetwork/

I think this is a very small diff, and I would be glad to see it in one of the
next sys-apps/baselayout releases.

Criticism and comments are welcome.

Kai



Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-13 13:56:38 UTC
We have support for this (was added for Adelie Cluster project).  I'll try
to do
some docs at some stage in near future.
Comment 2 Kai Lindenberg 2004-06-25 00:37:06 UTC
Maybe I should withdraw this request because there are too many oddities with other packages, mainly network hotplug stuff like ifplugd and the wireless script from the forum (http://forums.gentoo.org/viewtopic.php?t=122435).
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-08-01 03:25:17 UTC
We actually support this in baselayout-1.11.13

If you're in the runlevel "bar" then the init script is called "foo" then we do this

/etc/conf.d/foo.bar - if found, then use this
otherwise
/etc/conf.d/foo - if found then use this