diff options
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/flua/Makefile | 2 | ||||
-rw-r--r-- | libexec/flua/linit_flua.c | 3 | ||||
-rw-r--r-- | libexec/flua/lposix/Makefile | 5 | ||||
-rw-r--r-- | libexec/flua/lposix/Makefile.inc | 2 | ||||
-rw-r--r-- | libexec/flua/modules/lposix.c (renamed from libexec/flua/lposix/lposix.c) | 5 | ||||
-rw-r--r-- | libexec/flua/modules/lposix.h (renamed from libexec/flua/lposix/lposix.h) | 0 | ||||
-rwxr-xr-x | libexec/nuageinit/nuageinit | 1 | ||||
-rw-r--r-- | libexec/rc/rc.conf | 3 | ||||
-rwxr-xr-x | libexec/rc/rc.d/netwait | 10 |
9 files changed, 13 insertions, 18 deletions
diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index cc750e30525f..23de404710d0 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -16,7 +16,6 @@ FLUA_MODULES+= libjail .endif FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml -FLUA_MODULES+= lposix .ifdef BOOTSTRAPPING # libfreebsd is generally omitted from the bootstrap flua because its @@ -55,6 +54,7 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c +SRCS+= lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index bb3748daefb4..65356c938671 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -33,6 +33,7 @@ #include "lualib.h" #include "lauxlib.h" +#include "lposix.h" #include "bootstrap.h" @@ -54,6 +55,8 @@ static const luaL_Reg loadedlibs[] = { #if defined(LUA_COMPAT_BITLIB) {LUA_BITLIBNAME, luaopen_bit32}, #endif + /* FreeBSD Extensions */ + {"posix", luaopen_posix}, {NULL, NULL} }; diff --git a/libexec/flua/lposix/Makefile b/libexec/flua/lposix/Makefile deleted file mode 100644 index 92321d51be9a..000000000000 --- a/libexec/flua/lposix/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SHLIB_NAME= posix.so -WARNS?= 3 - -.include "Makefile.inc" -.include <bsd.lib.mk> diff --git a/libexec/flua/lposix/Makefile.inc b/libexec/flua/lposix/Makefile.inc deleted file mode 100644 index 499e6779e84d..000000000000 --- a/libexec/flua/lposix/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lposix.c diff --git a/libexec/flua/lposix/lposix.c b/libexec/flua/modules/lposix.c index 430bb6f28baf..75cdd345aeaa 100644 --- a/libexec/flua/lposix/lposix.c +++ b/libexec/flua/modules/lposix.c @@ -21,8 +21,6 @@ #include "lauxlib.h" #include "lposix.h" -#include "bootstrap.h" - static void enforce_max_args(lua_State *L, int max) { @@ -699,6 +697,3 @@ luaopen_posix(lua_State *L) return (1); } - -/* Only this one needed in our bootstrap set, it will load the others. */ -FLUA_MODULE(posix); diff --git a/libexec/flua/lposix/lposix.h b/libexec/flua/modules/lposix.h index 1aa33f042571..1aa33f042571 100644 --- a/libexec/flua/lposix/lposix.h +++ b/libexec/flua/modules/lposix.h diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 29340a3d91ea..f29fa8ba1bac 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -6,6 +6,7 @@ -- Copyright(c) 2025 Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org> local nuage = require("nuage") +local lfs = require("lfs") local ucl = require("ucl") local yaml = require("lyaml") diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 2589e2614c35..c776a815003c 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -501,7 +501,8 @@ netwait_timeout="60" # Total number of seconds to perform pings. #netwait_if="" # Wait for active link on each intf in this list. netwait_if_timeout="30" # Total number of seconds to monitor link state. netwait_dad="NO" # Wait for DAD to complete -netwait_dad_timeout="10" # Total number of seconds to wait for DAD. +netwait_dad_timeout="" # Total number of seconds to wait for DAD, zero + # or unset to autodetect ### Miscellaneous network options: ### icmp_bmcastecho="NO" # respond to broadcast ping packets diff --git a/libexec/rc/rc.d/netwait b/libexec/rc/rc.d/netwait index b609440a2e4e..05874552cf1c 100755 --- a/libexec/rc/rc.d/netwait +++ b/libexec/rc/rc.d/netwait @@ -36,13 +36,15 @@ netwait_start() err 1 "Nothing to wait for" fi - if ! [ "${netwait_if_timeout}" -ge 1 ]; then + if ! [ "${netwait_if_timeout:=0}" -ge 1 ]; then err 1 "netwait_if_timeout must be >= 1" fi - if ! [ "${netwait_dad_timeout}" -ge 1 ]; then - err 1 "netwait_dad_timeout must be >= 1" + if ! check_kern_features inet6; then + netwait_dad="NO" + elif ! [ "${netwait_dad_timeout:=0}" -ge 1 ]; then + netwait_dad_timeout=$(($(sysctl -n net.inet6.ip6.dad_count)+1)) fi - if ! [ "${netwait_timeout}" -ge 1 ]; then + if ! [ "${netwait_timeout:=0}" -ge 1 ]; then err 1 "netwait_timeout must be >= 1" fi |