
Code: Select all
# emerge -av openrc
Code: Select all
[ebuild U ] sys-apps/openrc-0.5.1-r1 [0.5.1] USE="ncurses pam unicode -debug (-oldnet%*)" 0 kBCode: Select all
*openrc-0.5.1-r1 (15 Oct 2009)
15 Oct 2009; Mike Frysinger <vapier@...org> +openrc-0.5.1-r1.ebuild,
openrc-9999.ebuild:
Rewrite the oldnet handling and make it the default for everyone.
Yes, I have a working wired LAN connection. The machine on which I set this up is core-too, and it doesn't have wireless. For the moment, I'm going to experiment a bit more with it, and update another machine. I want to make sure that this is both stable, and set to be around a while before I set up pappy-lap to use it. I'd have to completely rethink my automatic networking setup. At the moment, I'm not that inspired.d2_racing wrote:So right now, do you have a working lan card and what about your Wifi card ?
Can you tell us more about your experiment ?
Code: Select all
#!/sbin/runscript
# Copyright 2009 Funtoo Technologies, LLC
# All rights reserved. Released under the 2-clause BSD license.
IP=192.168.0.130
NM=255.255.255.0
GW=192.168.0.1
INT=eth0
DOM=no.org
NS1=65.68.49.50
NS2=65.68.49.51
NS3=192.168.0.1
depend() {
provide net
after net.lo
}
start() {
ebegin "Bringing up network interface $INT"
ifconfig $INT $IP netmask $NM up && \
route add default gw $GW $INT && \
resolvconf -a $INT << EOF
domain $DOM
nameserver $NS1
nameserver $NS2
nameserver $NS3
EOF
eend $?
}
stop() {
ebegin "Shutting down network interface $INT"
resolvconf -d $INT && \
route del default gw $GW $INT && \
ifconfig $INT down
eend $?
}

Good question. Between you and I, and everyone else reading, I don't know. My assumption is that you would make an individual script for each interface you wish to bring up, and load them all into /etc/runlevels/default.EvilEye wrote:pappy_mcfae, thanks for posting that information. I am about to take the plunge and try out openrc-0.5.1-r1
I have 3 question....
My computer currently has net.eth0 AND net.eth1. net.eth0 connects to the internet while net.eth1 connects to my network. The script you posted above only mentions INT=eth0 . Do I use that script again but just changed it to say INT=eth1 Then give both scripts different names, make executable, place in /etc/init.d and configure to run at boot?
Yes, there are several scripts available. The unfortunate thing is they're in new stage3's from funtoo. Fortunately for all concerned, I downloaded a recent funtoo stage-3, and I have all the scripts. I would have to untar the tarball again to get them, but when I do, I will post them on my server, and make a URL available.Does this also apply to wireless networking, just use INT=wlan0?
Yes, there is a bridging script. Please allow me about a half hour or so to respond to other emails, and I will get the scripts and make them available.What about Ethernet bridging (net.br0)?
Thanks in advance

You can use /etc/ifconfig.eth0 if you likesera wrote:Across kernels I agree, if Gentoo want's pure linux init scripts it can provide them itself. But across tools is exactly the old net.lo approach. So I was wondering myself why the current script "network" doesn't come as three different scripts. As net.loopback, net.ifconfig, net.iproute2 for example. This would also allow neater configuration files I guess.UberLord wrote: Again no, scripts should be portable across kernels and tools where possible.
I see no benefit in ignoring ifconfig for this
UberLord, do you know if that assumption is correct? (This is from pappy_mcfae's post 3 posts up)pappy_mcfae wrote:Good question. Between you and I, and everyone else reading, I don't know. My assumption is that you would make an individual script for each interface you wish to bring up, and load them all into /etc/runlevels/default.EvilEye wrote:pappy_mcfae, thanks for posting that information. I am about to take the plunge and try out openrc-0.5.1-r1
I have 3 question....
My computer currently has net.eth0 AND net.eth1. net.eth0 connects to the internet while net.eth1 connects to my network. The script you posted above only mentions INT=eth0 . Do I use that script again but just changed it to say INT=eth1 Then give both scripts different names, make executable, place in /etc/init.d and configure to run at boot?
UberLord, if you read this, is this assumption correct?
Code: Select all
ip_eth0="192.168.2.2/24; 10.0.1.5/8"
ip_eth1="192.168.5.4/24"
defaultroute="192.168.2.1"

Here's my take on it - if you want to roll scripts in whatever way you want and it works for you then got for it!pappy_mcfae wrote:Good question. Between you and I, and everyone else reading, I don't know. My assumption is that you would make an individual script for each interface you wish to bring up, and load them all into /etc/runlevels/default.EvilEye wrote:pappy_mcfae, thanks for posting that information. I am about to take the plunge and try out openrc-0.5.1-r1
I have 3 question....
My computer currently has net.eth0 AND net.eth1. net.eth0 connects to the internet while net.eth1 connects to my network. The script you posted above only mentions INT=eth0 . Do I use that script again but just changed it to say INT=eth1 Then give both scripts different names, make executable, place in /etc/init.d and configure to run at boot?
UberLord, if you read this, is this assumption correct?
Am I correct in understanding that I don't need to use the script that was posted by pappy_mcfae for eth0 or eth1 and the other script pappy_mcfae posted for download for br0?UberLord wrote:Or putting it another way, pappy_mcfae doesn't really bring anything to the table that /etc/init.d/network doesn't have.
openresolv can be configured directly, no need for a script.

It was my intent, at the request of d2_racing, to set this up on my machine, and put together a loose how-to for the folks on the Gentoo Quebec forums. There was a lot of buzz, but no information. I did so, and I think I did an admirable job, in comparison to all the other information there is about this on the Gentoo Forums. Oh that's right this thread is the only one that contains a how-to.Or putting it another way, pappy_mcfae doesn't really bring anything to the table that /etc/init.d/network doesn't have. openresolv can be configured directly, no need for a script.

That's right, I read all the threads from gentoo-dev list and man that openRc thread was a real flamewar. Vapier removed the new stuff so that everyone can have a working network without reading the actual code of openRc or the Funtoo doc.pappy_mcfae wrote:It was my intent, at the request of d2_racing, to set this up on my machine, and put together a loose how-to for the folks on the Gentoo Quebec forums. There was a lot of buzz, but no information. I did so, and I think I did an admirable job, in comparison to all the other information there is about this on the Gentoo Forums. Oh that's right this thread is the only one that contains a how-to.
Code: Select all
ifconfig_eth0="192.168.0.130 netmask 255.255.255.0"
defaultroute="192.168.0.1"Code: Select all
ifup_eth0="printf \"nameserver 65.68.49.50\nnameserver 65.68.49.51\n192.168.0.1\ndomain no.org\" | resolvconf -a \$int"
Code: Select all
interface eth0
static ip_address=192.168.0.130/24
static routers=192.168.0.1
static domain_name=no.org
static domain_servers=65.68.49.50 65.68.49.51 192.168.0.1That's not entirely accurate.d2_racing wrote:That's right, I read all the threads from gentoo-dev list and man that openRc thread was a real flamewar. Vapier removed the new stuff so that everyone can have a working network without reading the actual code of openRc or the Funtoo doc.pappy_mcfae wrote:It was my intent, at the request of d2_racing, to set this up on my machine, and put together a loose how-to for the folks on the Gentoo Quebec forums. There was a lot of buzz, but no information. I did so, and I think I did an admirable job, in comparison to all the other information there is about this on the Gentoo Forums. Oh that's right this thread is the only one that contains a how-to.

I have a nice long chat with Daniel last night. I made him aware of exactly what dhcpcd-5 can do these days and he was very impressed. So impressed said he was going to re-do a lot of the Funtoo Networking around it. Or at least document it morepappy_mcfae wrote:FYI, my script came from Daniel Robbins' Funtoo Networking Guide. The only change I did was to add the gateway as a third name server.

emerge --infopappy_mcfae wrote:costel78,
before we go further, please post the results of emerge --info.
Blessed be!
Pappy
Code: Select all
Portage 2.2_rc46 (default/linux/amd64/10.0/desktop, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-reiser4-r3-costel x86_64)
=================================================================
System uname: Linux-2.6.31-reiser4-r3-costel-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 17 Oct 2009 08:00:01 +0000
app-shells/bash: 4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python: 2.6.3, 3.1.1-r1
dev-util/cmake: 2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc: 0.5.1-r1
sys-apps/sandbox: 2.1
sys-devel/autoconf: 2.13, 2.63-r1
sys-devel/automake: 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils: 2.20.51.0.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.30-r1
ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/fax /usr/share/X11/xkb /usr/share/config /var/bind /var/lib/hsqldb /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests candy distlocks fixpackages lmirror news nodoc parallel-fetch preserve-libs sfperms strict suidctl unmerge-logs unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://localhost http://mirrors.xservers.ro/gentoo/ http://ftp.roedu.net/pub/mirrors/gentoo.org/ http://mirrors.evolva.ro/gentoo/ http://distfiles.gentoo.org/ http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ro_RO.UTF-8"
LC_ALL="ro_RO.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--warn-once,--hash-style=gnu"
LINGUAS="ro en en_GB"
MAKEOPTS="-j8 --load-average=10"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--progress --delete-before --human-readable"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/added /usr/portage/local/mozilla /usr/portage/local/gnome /usr/portage/local/rusxmms"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 aspell audio berkdb big-tables bluetooth branding bzip2 cairo cdr clamav cleartype cli consolekit cracklib crypt cups curl custom-cflags dbus dhcp directfb dovecot-sasl dri dts dvd dvdr eds emboss encode esd evo extras faac faad fam fbcon fbcondecor ffmpeg firefox flac fontconfig fontforge fortran fuse gd gdbm geoip gif git gmp gnome gnutls gpm graphviz gsm gstreamer gtk hal hddtemp iconv icotools icu idn ieee1394 imagemagick iproute2 ipv6 isdnlog ithreads jack java jpeg jpeg2k justify kde kde3 kdehiddenvisibility kerberos lame lcms ldap libcaca libnotify lm_sensors lzma mad matroska mikmod mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib multipath mysql mysqli ncurses nls nptl nptlonly nsplugin nvidia ogg openal openexr opengl openmp oss pam pango pch pcre pdf perl pg-intdatetime plugins png policykit postgres ppds pppd pulseaudio python qt3support qt4 quicktime rcc readline realms reflection replytolist restrict-javascript rle rrdtool samba sasl schroedinger sdl session sip slang smbclient sndfile snmp socks5 sound spamassassin spell spl sql sqlite sse sse2 ssh ssl startup-notification subversion svg swat symlink sysfs syslog tcl tcpd theora threads thunar tiff tk tools truetype unicode urandom usb utf utf8 v4l v4l2 vdpau vhosts video vorbis wav webdav webkit win64 winetools x264 xattr xcb xcomposite xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_alias cern_meta charset_lite dumpio log_forensic proxy_ftp version actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias asis substitute" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ro en en_GB" LIRC_DEVICES="hauppauge" NETBEANS_MODULES="apisupport harness ide java nb cnd groovy gsf identity j2ee mobility php profiler soa visualweb webcommon websvccommon xml dlight ergonomics ruby enterprise" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
I wasn't actually talking about splitting the configuration but the script. Using "/etc/ifconfig.eth0" doesn't feel natural enough for my taste anyway.UberLord wrote:You can use /etc/ifconfig.eth0 if you likesera wrote:Across kernels I agree, if Gentoo want's pure linux init scripts it can provide them itself. But across tools is exactly the old net.lo approach. So I was wondering myself why the current script "network" doesn't come as three different scripts. As net.loopback, net.ifconfig, net.iproute2 for example. This would also allow neater configuration files I guess.UberLord wrote: Again no, scripts should be portable across kernels and tools where possible.
I see no benefit in ignoring ifconfig for this
Yes, that's not the normal Gentoo way, but it also means we're configuration compatible with some of the BSD based RC systems.
Code: Select all
dhcpcd eth0