Skip to content

Commit

Permalink
Initial import of NetBSD rc system
Browse files Browse the repository at this point in the history
IMPORTANT: this change has a docs/UPDATING entry!

This patch performs an initial import of the infrastructure and a
subset of the NetBSD set of rc startup and shutdown scripts.  The
"initial" refers to the fact that this is not yet a full switch to the
NetBSD rc system: the MINIX ramdisk rc script, which (typically) runs
as the first thing, is kept as is.  After mounting the root file
system, the ramdisk rc script will start the NetBSD rc infrastructure
by invoking /etc/rc, however.  The regular MINIX startup-and-shutdown
script has been moved from /etc/rc to /etc/rc.minix, and is now
invoked as part of the NetBSD rc infrastructure through a bridge rc
script /etc/rc.d/minixrc.  /etc/rc.minix invokes /usr/etc/rc as before.

Switching over the ramdisk to the NetBSD system and decomposing the
MINIX rc.minix script into smaller components are left to future work.
Also, the current pkgsrc etc/rc.d auto-start functionality is left as
is, even though it should be removed (see the etc/usr/rc comment).

Change-Id: Ia96cae7c426e94b85c67978dc1307dacc4b09fc5
  • Loading branch information
dcvmoole committed Feb 23, 2017
1 parent 2109df2 commit 325ce30
Show file tree
Hide file tree
Showing 45 changed files with 5,111 additions and 287 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lib*.so*
*.a
*.so.*
*.d
!etc/*.d
.depend
*.gcno
*.gcda
Expand Down
24 changes: 24 additions & 0 deletions distrib/sets/lists/minix-base/mi
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,32 @@
./etc/rc.cd minix-base
./etc/rc.conf minix-base
./etc/rc.d minix-base
./etc/rc.d/DAEMON minix-base
./etc/rc.d/DISKS minix-base
./etc/rc.d/LOGIN minix-base
./etc/rc.d/NETWORKING minix-base
./etc/rc.d/SERVERS minix-base
./etc/rc.d/blacklistd minix-base
./etc/rc.d/bootconf.sh minix-base
./etc/rc.d/fsck minix-base
./etc/rc.d/ftpd minix-base
./etc/rc.d/ipfilter minix-base
./etc/rc.d/ipsec minix-base
./etc/rc.d/local minix-base
./etc/rc.d/minixrc minix-base
./etc/rc.d/mountcritlocal minix-base
./etc/rc.d/mountcritremote minix-base
./etc/rc.d/network minix-base
./etc/rc.d/npf minix-base
./etc/rc.d/pwcheck minix-base
./etc/rc.d/root minix-base
./etc/rc.d/sysctl minix-base
./etc/rc.d/sysdb minix-base
./etc/rc.d/syslogd minix-base
./etc/rc.d/ttys minix-base
./etc/rc.d/wscons minix-base
./etc/rc.daemons.dist minix-base
./etc/rc.minix minix-base
./etc/rc.shutdown minix-base
./etc/rc.subr minix-base
./etc/release minix-base
Expand Down
6 changes: 6 additions & 0 deletions distrib/sets/lists/minix-man/mi
Original file line number Diff line number Diff line change
Expand Up @@ -3299,6 +3299,7 @@
./usr/man/man5/passwd.5 minix-man
./usr/man/man5/pkg_install.conf.5 minix-man
./usr/man/man5/pkg_summary.5 minix-man
./usr/man/man5/rc.conf.5 minix-man
./usr/man/man5/resolv.conf.5 minix-man
./usr/man/man5/resolver.5 minix-man
./usr/man/man5/rhosts.5 minix-man
Expand Down Expand Up @@ -3429,6 +3430,11 @@
./usr/man/man8/pwdauth.8 minix-man obsolete
./usr/man/man8/rarpd.8 minix-man
./usr/man/man8/rawspeed.8 minix-man
./usr/man/man8/rc.8 minix-man
./usr/man/man8/rc.d.8 minix-man
./usr/man/man8/rc.local.8 minix-man
./usr/man/man8/rc.shutdown.8 minix-man
./usr/man/man8/rc.subr.8 minix-man
./usr/man/man8/rcorder.8 minix-man
./usr/man/man8/rdate.8 minix-man
./usr/man/man8/readclock.8 minix-man
Expand Down
6 changes: 6 additions & 0 deletions docs/UPDATING
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
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.
You can then still make the same edit from single user mode, but that
is not as easy.

20170222:
Because of naming conflicts, the MINIX 3 service(8) utility has been
renamed to "minix-service". After successfully rebuilding the system
Expand Down
18 changes: 12 additions & 6 deletions etc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,18 @@ BINOWN= root
BINGRP= wheel
UTMPGRP= utmp
.if defined(__MINIX)
BIN1+= boot.cfg.default \
BIN1+= \
\
gettytab \
man.conf \
passwd.conf protocols rc rc.cd rc.subr \
rc.daemons.dist rs.inet rs.single \
services shells syslog.conf \
termcap utmp gettytab rc.shutdown
\
passwd.conf \
protocols rc rc.cd rc.subr \
rc.shutdown services shells \
syslog.conf
# MINIX-only files:
BIN1+= boot.cfg.default rc.daemons.dist rc.minix \
rs.inet rs.single termcap utmp
.else
BIN1+= bootptab changelist csh.cshrc csh.login \
csh.logout daily daily.conf dm.conf envsys.conf floppytab ftpchroot \
Expand Down Expand Up @@ -476,7 +482,7 @@ install-etc-files-safe: .PHONY .MAKE check_DESTDIR MAKEDEV
${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/etc/rc.capes/* ${DESTDIR}/etc/rc.capes
${INSTALL_FILE} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} ${NETBSDSRCDIR}/minix/drivers/usb/usbd/usbd.conf ${DESTDIR}/etc/system.conf.d/usbd
.endif # Minix/earm specific
.for subdir in . defaults mtree root skel
.for subdir in . defaults mtree rc.d root skel
${MAKEDIRTARGET} ${subdir} configinstall
.endfor
${_MKMSG_INSTALL} ${DESTDIR}/usr/lib/fonts
Expand Down
4 changes: 4 additions & 0 deletions etc/defaults/minix.rc.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Minix-specific rc.conf default values

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

# Where to find servers/drivers binaries
PKG_SERVICE_DIR=/usr/pkg/service
SERVICES_DIRS="/service $PKG_SERVICE_DIR"
Expand Down
Loading

0 comments on commit 325ce30

Please sign in to comment.