Deprecate the network and staticroute scripts
These scripts are not supported, and they have several major design issues such as not being able to stop, start or allow a dependency on a single interface.
This commit is contained in:
parent
3f2e9c4e1f
commit
5994e55937
7
Makefile
7
Makefile
@ -4,12 +4,7 @@
|
|||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
SUBDIR= conf.d etc init.d local.d man scripts sh src
|
SUBDIR= conf.d doc etc init.d local.d man net scripts sh src
|
||||||
|
|
||||||
# Build our old net foo or not
|
|
||||||
ifeq (${MKOLDNET},yes)
|
|
||||||
SUBDIR+= net doc
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Build pkgconfig or not
|
# Build pkgconfig or not
|
||||||
MKPKGCONFIG?= yes
|
MKPKGCONFIG?= yes
|
||||||
|
1
README
1
README
@ -16,7 +16,6 @@ MKRCSYS=prefix
|
|||||||
MKSELINUX=yes
|
MKSELINUX=yes
|
||||||
MKTERMCAP=ncurses
|
MKTERMCAP=ncurses
|
||||||
MKTERMCAP=termcap
|
MKTERMCAP=termcap
|
||||||
MKOLDNET=yes
|
|
||||||
PKG_PREFIX=/usr/pkg
|
PKG_PREFIX=/usr/pkg
|
||||||
LOCAL_PREFIX=/usr/local
|
LOCAL_PREFIX=/usr/local
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
The following applies only to the newnet stack, which is not presently
|
|
||||||
maintained in OpenRC. The oldnet stack is maintained instead.
|
|
||||||
- Robin H. Johnson <robbat2@gentoo.org>, 2011/02/21
|
|
||||||
|
|
||||||
OpenRC Network Ideals
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
The new style networking for OpenRC is very simplistic - provide a basic means
|
|
||||||
of configuring static interface address and routes whilst allowing the
|
|
||||||
possibility to run any command at any point.
|
|
||||||
|
|
||||||
In a nutshell, init.d/network is a wrapper around ifconfig(8) and
|
|
||||||
init.d/staticroute is wrapper around route(8).
|
|
||||||
|
|
||||||
In the Perfect World (TM) ifconfig should be able to configure everything
|
|
||||||
about the interface easily * . The BSD family almost get this right and Linux
|
|
||||||
epically fails.
|
|
||||||
|
|
||||||
* Only static configuration, including link setup.
|
|
||||||
For dynamic, static, IPv4LL, arping and per ssid IPv4 setup dhcpcd-5.x
|
|
||||||
provides your needs.
|
|
||||||
|
|
||||||
It fails because there are many tools to do the same job and often have
|
|
||||||
vastly different syntax where they could be similar. In other words, there
|
|
||||||
is no coherence.
|
|
||||||
|
|
||||||
OpenRC-0.4.x and older (inc Gentoo baselayout-1) had a collection of scripts
|
|
||||||
for each tool and allowed a script per interface. Over the years, this design
|
|
||||||
has proven very hard to maintain as each user has their own idea of how
|
|
||||||
things should work. Also, there were (and still are) race conditions.
|
|
||||||
|
|
||||||
So where do we go from here?
|
|
||||||
Well, it's possible to use the new network scripts using the tools
|
|
||||||
currently available. It's just harder as you have to know them and their
|
|
||||||
documentation can be lacking at times.
|
|
||||||
The correct end goal is a BSD style ifconfig tool.
|
|
||||||
I've started work on it, but the project has stalled somewhat.
|
|
||||||
It's display only right now and the source is not yet publicly available.
|
|
||||||
If you have the skills and share the vision then contact me privately and
|
|
||||||
we'll take it from there.
|
|
@ -4,15 +4,9 @@ SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \
|
|||||||
sysctl.in urandom.in ${SRCS-${OS}}
|
sysctl.in urandom.in ${SRCS-${OS}}
|
||||||
BIN= ${OBJS}
|
BIN= ${OBJS}
|
||||||
|
|
||||||
# Build our old net foo or not
|
INSTALLAFTER= _installafter_net.lo
|
||||||
ifeq (${MKOLDNET},yes)
|
CLEANFILES+= net.lo
|
||||||
_OLDNET= net.lo
|
TARGETS+= net.lo
|
||||||
endif
|
|
||||||
_NET_LO= ${_OLDNET}
|
|
||||||
|
|
||||||
INSTALLAFTER= _installafter_${_NET_LO}
|
|
||||||
CLEANFILES+= ${_NET_LO}
|
|
||||||
TARGETS+= ${_NET_LO}
|
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
@ -45,4 +39,4 @@ include ${MK}/scripts.mk
|
|||||||
_installafter_: realinstall
|
_installafter_: realinstall
|
||||||
|
|
||||||
_installafter_net.lo: realinstall
|
_installafter_net.lo: realinstall
|
||||||
${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO}
|
${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO-${OS}}
|
||||||
|
@ -219,6 +219,12 @@ start()
|
|||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ewarn
|
||||||
|
ewarn "The $RC_SVCNAME script is deprecated and will be"
|
||||||
|
ewarn "removed in the future."
|
||||||
|
ewarn "Please use the net.* scripts to manage your network interfaces."
|
||||||
|
ewarn
|
||||||
|
|
||||||
einfo "Starting network"
|
einfo "Starting network"
|
||||||
routeflush
|
routeflush
|
||||||
if [ "$RC_UNAME" = "Linux" ]; then
|
if [ "$RC_UNAME" = "Linux" ]; then
|
||||||
|
@ -93,6 +93,11 @@ do_routes()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
|
ewarn
|
||||||
|
ewarn "The $RC_SVCNAME script is deprecated and will be"
|
||||||
|
ewarn "removed in the future."
|
||||||
|
ewarn "Please use the net.* scripts to manage your network interfaces."
|
||||||
|
ewarn
|
||||||
do_routes "Adding" "add"
|
do_routes "Adding" "add"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
BOOT= bootmisc fsck hostname localmount network \
|
BOOT= bootmisc fsck hostname localmount \
|
||||||
root staticroute swap sysctl urandom ${BOOT-${OS}}
|
root swap sysctl urandom ${BOOT-${OS}}
|
||||||
DEFAULT= local netmount
|
DEFAULT= local netmount
|
||||||
SHUTDOWN= savecache ${SHUTDOWN-${OS}}
|
SHUTDOWN= savecache ${SHUTDOWN-${OS}}
|
||||||
SYSINIT= ${SYSINIT-${OS}}
|
SYSINIT= ${SYSINIT-${OS}}
|
||||||
@ -10,8 +10,6 @@ BOOTDIR= ${LEVELDIR}/boot
|
|||||||
DEFAULTDIR= ${LEVELDIR}/default
|
DEFAULTDIR= ${LEVELDIR}/default
|
||||||
SHUTDOWNDIR= ${LEVELDIR}/shutdown
|
SHUTDOWNDIR= ${LEVELDIR}/shutdown
|
||||||
|
|
||||||
INITDIR= ../init.d
|
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/sys.mk
|
include ${MK}/sys.mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
@ -28,7 +26,7 @@ BOOT-FreeBSD= hostid net.lo0 newsyslog savecore syslogd
|
|||||||
# FreeBSD specific stuff
|
# FreeBSD specific stuff
|
||||||
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
BOOT-FreeBSD+= adjkerntz dumpon syscons
|
||||||
|
|
||||||
BOOT-Linux= hwclock keymaps modules mtab procfs termencoding
|
BOOT-Linux= hwclock keymaps modules mtab net.lo procfs termencoding
|
||||||
SHUTDOWN-Linux= killprocs mount-ro
|
SHUTDOWN-Linux= killprocs mount-ro
|
||||||
SYSINIT-Linux= devfs dmesg
|
SYSINIT-Linux= devfs dmesg
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user