Skip to content

Commit

Permalink
Import NetBSD networking rc scripts
Browse files Browse the repository at this point in the history
IMPORTANT: this change has a docs/UPDATING entry!

Change-Id: I6f1e575166f5b47530a004c12aea9b45b571e13d
  • Loading branch information
dcvmoole committed Apr 30, 2017
1 parent 9a8b4f5 commit 1dee92e
Show file tree
Hide file tree
Showing 13 changed files with 903 additions and 10 deletions.
2 changes: 2 additions & 0 deletions distrib/sets/lists/minix-base/mi
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
./etc/rc.d/dhcpcd minix-base
./etc/rc.d/dhcpd minix-base
./etc/rc.d/dhcrelay minix-base
./etc/rc.d/downinterfaces minix-base
./etc/rc.d/fsck minix-base
./etc/rc.d/ftpd minix-base
./etc/rc.d/inetd minix-base
Expand All @@ -161,6 +162,7 @@
./etc/rc.d/pwcheck minix-base
./etc/rc.d/root minix-base
./etc/rc.d/rtadvd minix-base
./etc/rc.d/staticroute minix-base
./etc/rc.d/sysctl minix-base
./etc/rc.d/sysdb minix-base
./etc/rc.d/syslogd minix-base
Expand Down
2 changes: 2 additions & 0 deletions distrib/sets/lists/minix-man/mi
Original file line number Diff line number Diff line change
Expand Up @@ -3365,6 +3365,7 @@
./usr/man/man5/hosts_options.5 minix-man
./usr/man/man5/http_status.5 minix-man obsolete
./usr/man/man5/httpd.conf.5 minix-man obsolete
./usr/man/man5/ifconfig.if.5 minix-man
./usr/man/man5/inetd.conf.5 minix-man
./usr/man/man5/info.5 minix-man
./usr/man/man5/keymap.5 minix-man
Expand All @@ -3390,6 +3391,7 @@
./usr/man/man5/resolver.5 minix-man
./usr/man/man5/rhosts.5 minix-man obsolete
./usr/man/man5/rndc.conf.5 minix-man
./usr/man/man5/route.conf.5 minix-man
./usr/man/man5/rtadvd.conf.5 minix-man use_inet6
./usr/man/man5/serv.access.5 minix-man obsolete
./usr/man/man5/statvfs.5 minix-man
Expand Down
18 changes: 18 additions & 0 deletions docs/UPDATING
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
20170303:
The entire network stack has been replaced. This requires two updates.
First, BEFORE rebooting, either before or after rebuilding the system,
copy the following new configuration files from /usr/src/etc into /etc:

# cd /usr/src/etc
# cp hosts inetd.conf named.conf nsswitch.conf /etc

Second, AFTER rebooting, set up a new network configuration for your
system. Run netconf(8) and and follow its instructions:

# netconf

If you previously configured your network statically and you forgot its
settings, take a look at /etc/rc.network. That file and /etc/inet.conf
are no longer used now. See the ifconfig.if(5) manual page for more
information about how network settings are specified going forward.

20170223:
Edit your /etc/rc.conf to set rc_configured to YES. If you do not,
your system will refuse to enter multi-user mode after the next reboot.
Expand Down
2 changes: 1 addition & 1 deletion etc/defaults/minix.rc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Override settings in NetBSD's default rc.conf with different default settings
# for MINIX here, typically to disable scripts that NetBSD enables by default.
inetd=NO
#(nothing yet)

# Where to find servers/drivers binaries
PKG_SERVICE_DIR=/usr/pkg/service
Expand Down
2 changes: 1 addition & 1 deletion etc/rc.cd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ create_ramdisk()
}

# Create /var ramdisk
create_ramdisk ram0 /var 512
create_ramdisk ram0 /var 768
create_ramdisk ram1 /tmp 128
create_ramdisk ram2 /usr/run 64
create_ramdisk ram3 /root 512
Expand Down
4 changes: 2 additions & 2 deletions etc/rc.d/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CONFIGFILES=\
\
bootconf.sh \
\
dhclient dhcpcd dhcpd dhcrelay \
dhclient dhcpcd dhcpd dhcrelay downinterfaces \
fsck ftpd \
\
\
Expand All @@ -48,7 +48,7 @@ CONFIGFILES=\
root rtadvd \
\
\
sysctl sysdb syslogd \
staticroute sysctl sysdb syslogd \
ttys \
wscons \

Expand Down
37 changes: 37 additions & 0 deletions etc/rc.d/downinterfaces
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
#
# $NetBSD: downinterfaces,v 1.6 2009/09/05 16:26:07 apb Exp $
#

# PROVIDE: downinterfaces
# KEYWORD: nostart shutdown

$_rc_subr_loaded . /etc/rc.subr

name="downinterfaces"
start_cmd=":"
stop_cmd="downinterfaces_stop"

downinterfaces_stop()
{
tmp=$(ifconfig -lu)
iflist=""
for int in $tmp; do
case $int in
pppoe*) iflist="$iflist $int"
;;
esac
done
iflist="$iflist $force_down_interfaces"
if [ "$iflist" != "" ] && [ "$iflist" != " " ]
then

echo "Shutting down interfaces:$iflist"
for int in $iflist; do
ifconfig $int down
done
fi
}

load_rc_config $name
run_rc_command "$1"
Loading

0 comments on commit 1dee92e

Please sign in to comment.