rc.d: Add FILESYSTEMS dummy dependency This dummy dependency ensures that root and other critical local file systems are mounted. One of the intentions to add this dummy dependency is to fix the warnings caused by some ports' rc script wrongly dependent on this script. Update the rc.8 man page; meanwhile, tweak the description of other dummy dependencies a bit. Updating existing rc scripts to make use of FILESYSTEMS is coming in another commit. Obtained-from: FreeBSD
wg: Write rc(8) script to easily manage wg(4) interfaces This "wg" rc(8) script is somewhat similar to the "wg-quick" tool on Linux/FreeBSD. It can be used to quickly start/stop the wg(4) interfaces according to the wg.conf(5) configuration files in the "/etc/wireguard" directory. The syntax of wg.conf(5) configuration file is very similar to that of "wg-quick" but with necessary changes and minor additions. See wg.conf(5) for details. On the one hand, the new "wg_enable" and "wg_interfaces" variables in "/etc/rc.conf" can be used to auto-configure the wg(4) interfaces during the system startup. See rc.conf(5) for more details. On the other hand, this "wg" script can be manually called from the command-line to start/stop the wg(4) interfaces. Thanks to swildner for reviewing the man page.
rc.d: Add mounttmpfs to support tmpfs at /var/run and /tmp We are already mounting a tmpfs at /var/run/shm to support shm_open() etc functions. However, this makes it harder for a user to make /var/run on a tmpfs. Actually, using a tmpfs for /var/run is a good idea, though the deamons/system need to create necessary folders, and Linux has adopted such a model for /run (symlink to /var/run) for years. Introduce the 'mounttmpfs' rc script to support mounting tmpfs at /var/run and /tmp, which is enabled by setting 'tmpfs_var_run=YES' and 'tmpfs_tmp=YES' in /etc/rc.conf, respectively. The default values for these two new configurations are both 'NO'. The new 'mounttmpfs' rc script is ordered *after* 'mountcritremote', so that NFS-mounted /var is also properly handled, although I think NFS-mounted /var is not a good idea and I don't know anyone really need to do so. Also move the tmpfs mounting at /var/run/shm from 'mountcritlocal' to the new 'mounttmpfs' script. Reviewed-by: tuxillo
rc.d: Introduce 'dhcp_client' to wrap over dhclient and dhcpcd The new 'dhcp_client' rc script is a wrapper to start either dhclient(8) or dhcpcd(8) based on the value of the 'dhcp_client' rc variable. Other rc scripts are updated to depend on this wrapper instead of the explicit 'dhclient'. This eases the migration from dhclient(8) to dhcpcd(8) later. Update rc.conf.5 and dhcp.8 man pages accordingly. Meanwhile, remove the two obsolete variables 'dhcp_{program,flags}' from /etc/rc.subr.
rc.d: Add ip6addrctl (enabled by default with policy AUTO) Bring in the ip6addrctl rc script from FreeBSD. It is enabled by default with policy "AUTO", so the IPv4/IP6 preference is configured on startup. The rc variable "ip6addrctl_policy" is used to adjust the preference (AUTO, ipv6_prefer, ipv6_prefer). See the rc.conf(5) man page for more details.
Remove IPsec and related code from the system. It was unmaintained ever since we inherited it from FreeBSD 4.8. In fact, we had two implementations from that time: IPSEC and FAST_IPSEC. FAST_IPSEC is the implementation to which FreeBSD has moved since, but it didn't even build in DragonFly. Fixes for dports have been committed to DeltaPorts. Requested-by: dillon Dports-testing-and-fixing: zrj
rc.d: Add ipfw3 rc script To use ipfw3, add 'ipfw3_enable=YES' to /etc/rc.conf . By default, only the 'ipfw3' and 'ipfw3_basic' modules will be loaded. If you need more ipfw3 modules, set them with 'ipfw3_modules="<modules> ..."' in /etc/rc.conf . See also the rc.conf(5) man page. This ipfw3 rc script is largely based on the ipfw script. The /etc/ipfw3.rules (a shell script) should be present to setup the firewall rules, otherwise the default setup will block all incoming connections, including your current connection! NOTE: I wrote this script for use in my VPS last year, but switched to PF later, so more tests and improvements (e.g., flush tables on stop) to this script are needed. Reviewed-by: swildner
rc.d - Add option to load kernel modules from rc.conf(5) Due to memory limitations in the early boot phase it is not advisable to load kernel modules that are not strictly necessary to mount the root file system via loader.conf(5). Therefore a new rc script "modules" is added that allows loading of kernel modules from rc.conf(5).
Remove the remaining traces of linux emulation. List of other commits that removed linuxulator related things: c98d47402ed663efb73e3bf836bb7d0963bae310 config(8): Comment out some linux emulation remains. 6737a4ffb92cef94699bb4eb7042e8125718fc02 Clean up some more after the sys/emulation/linux removal. 85aae976e20fc6b5be7ebb996fdf69c1c31e2b5b kernel, world - Remove the remaining vestiges of linux emul
Remove am-utils, the Berkeley automounter suite (amd, amq, etc.) We recently got FreeBSD's autofs(5) which replaces it. FreeBSD added notes to their am-utils and related manual pages saying that it is obsolete and advises to use autofs(5) instead. DragonFly's port of it is almost surely broken and the last time I heard from someone trying to get it to work was in 2013 and back then it just hung (in select(), according to my notes). So I don't think removing instead of trying to fix it will do any harm.
autofs: Port autofs from FreeBSD Brought in basically from FreeBSD@GitHub cac9beab7d53f0c37ce2a2a1b893be59028928f4 with lots of changes. Note that this commit isn't necessarily 1:1 with above commit. Kernel code is basically a rewrite based on the FreeBSD code. Userspace is basically 1:1 with FreeBSD except that lots of small changes (including related commits listed below) were necessary. This is due to autofs being dependent on FreeBSD specific interface, command options and such. For userspace, note that non-functional stuff (e.g. whitespace warnings via git am) are intentionally left to be 1:1 with FreeBSD. Userspace is basically portable, so don't try to obfuscate the real changes made for DragonFly by fixing these for now till things are considered stable unless it's a bug from FreeBSD. Summary of newly added or modified files. - sys/vfs/autofs - autofs filesystem - usr.sbin/autofs - autofs userspace command and daemons - etc/ - configuration files and manpages - others - changes in misc subsystems (not independent of autofs) Related DragonFly commits. - usr.sbin/autofs: Workaround namecache bug after unmount - sys/kern: Don't implement .vfs_sync unless sync is supported - user.sbin/fstyp: Port fstyp from FreeBSD - sys/kern: Retry nlookup if nresolve returned ESTALE - sys/sys: Fix IOCPARM_MAX - sys/sys: Extend IOCPARM_MAX - usr.bin/showmount: Add -E option - sbin/mount_nfs: Add -o retrycnt= option - sys/kern: Add kqueue EVFILT_FS - sys/kern: Add kstrndup() Related DragonFly PRs. - https://bugs.dragonflybsd.org/issues/2900 - https://bugs.dragonflybsd.org/issues/2901 - https://bugs.dragonflybsd.org/issues/2905 - https://bugs.dragonflybsd.org/issues/2907 - https://bugs.dragonflybsd.org/issues/2908 - https://bugs.dragonflybsd.org/issues/2909 - https://bugs.dragonflybsd.org/issues/2912 - https://bugs.dragonflybsd.org/issues/2913 - https://bugs.dragonflybsd.org/issues/2914 Other related resource. - http://lists.dragonflybsd.org/pipermail/users/2016-May/thread.html#249556 - http://lists.dragonflybsd.org/pipermail/users/2016-June/thread.html#249680 - https://www.dragonflydigest.com/2016/05/06/18066.html
Disconnect hostapd from building in base There is insufficient reason to have hostapd in base at all. Moveover, this version is three releases behind and probably has several security vulnerabilities. Users that need a wifi access point should install net/hostapd instead which the latest release and patched for known security issues. approved-by: dillon
i386 removal, part 1/x: Remove 'real' APM and associated stuff. Notes: * 'apm' is now an alias for 'acpiconf -i 0', because some people got used to checking their battery status typing 'apm'. * powerd(8) recently gained the ability to shut down on low battery. Any remaining functionality from the former battd(8) could be added to it.
Remove the old USB stack and related userland, etc. As detailed in UPDATING, users with a custom configuration file which was derived from a *GENERIC file before we made usb4bsd default (this happened in 3.6) might need to remove or comment out a couple of devices which are now unknown.