summaryrefslogtreecommitdiff
path: root/net/samba4
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-06-21 10:23:48 +0000
committernia <nia@pkgsrc.org>2021-06-21 10:23:48 +0000
commit9e3c46bbf4ddc3fdf4d1a81a43a899621261f1d0 (patch)
tree9a4c7c9eddd3913dfbee60f497e9770be09ffff6 /net/samba4
parent068098b20aafee20160d996235744879ec08c7bf (diff)
downloadpkgsrc-9e3c46bbf4ddc3fdf4d1a81a43a899621261f1d0.tar.gz
samba4: Warn before starting if procfs is not mounted on NetBSD...
Diffstat (limited to 'net/samba4')
-rw-r--r--net/samba4/Makefile3
-rwxr-xr-xnet/samba4/files/nmbd.sh11
-rw-r--r--net/samba4/files/samba.sh11
-rwxr-xr-xnet/samba4/files/smbd.sh12
-rw-r--r--net/samba4/files/winbindd.sh11
5 files changed, 43 insertions, 5 deletions
diff --git a/net/samba4/Makefile b/net/samba4/Makefile
index 2169a0b7009..382e95552ac 100644
--- a/net/samba4/Makefile
+++ b/net/samba4/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.125 2021/06/01 08:30:17 adam Exp $
+# $NetBSD: Makefile,v 1.126 2021/06/21 10:23:48 nia Exp $
DISTNAME= samba-4.14.5
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= https://download.samba.org/pub/samba/stable/
diff --git a/net/samba4/files/nmbd.sh b/net/samba4/files/nmbd.sh
index 75b30b365a3..e57bb9c1ad0 100755
--- a/net/samba4/files/nmbd.sh
+++ b/net/samba4/files/nmbd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: nmbd.sh,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+# $NetBSD: nmbd.sh,v 1.2 2021/06/21 10:23:48 nia Exp $
#
# PROVIDE: nmbd
# REQUIRE: DAEMON
@@ -13,10 +13,19 @@ command="@PREFIX@/sbin/${name}"
pidfile="@SMB_PID@/${name}.pid"
required_files="@SMB_CONFIG@/smb.conf"
extra_commands="reload"
+start_precmd="nmbd_precmd"
command_args="-D" # _must_ start as daemon from rc.d;
# add more flags through ${${name}_flags}
reload_cmd=":" # avoid dumping debug output on SIGHUP
+nmbd_precmd()
+{
+ if ! [ -f /proc/cpuinfo ]; then
+ echo "WARNING: Samba requires a Linux-compatible procfs!"
+ echo "WARNING: Please mount /proc before starting Samba."
+ fi
+}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/net/samba4/files/samba.sh b/net/samba4/files/samba.sh
index 0a3a7d998b5..b99428113d0 100644
--- a/net/samba4/files/samba.sh
+++ b/net/samba4/files/samba.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: samba.sh,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+# $NetBSD: samba.sh,v 1.2 2021/06/21 10:23:48 nia Exp $
#
# PROVIDE: samba
# REQUIRE: DAEMON
@@ -13,6 +13,15 @@ command="@PREFIX@/sbin/${name}"
pidfile="@SMB_PID@/${name}.pid"
required_files="@SMB_CONFIG@/smb.conf"
extra_commands="reload"
+start_precmd="samba_precmd"
+
+samba_precmd()
+{
+ if ! [ -f /proc/cpuinfo ]; then
+ echo "WARNING: Samba requires a Linux-compatible procfs!"
+ echo "WARNING: Please mount /proc before starting Samba."
+ fi
+}
load_rc_config $name
run_rc_command "$1"
diff --git a/net/samba4/files/smbd.sh b/net/samba4/files/smbd.sh
index 37bb8084b73..b4c0b1d2384 100755
--- a/net/samba4/files/smbd.sh
+++ b/net/samba4/files/smbd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: smbd.sh,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+# $NetBSD: smbd.sh,v 1.2 2021/06/21 10:23:48 nia Exp $
#
# PROVIDE: smbd
@@ -14,6 +14,7 @@ required_files="@SMB_CONFIG@/smb.conf"
extra_commands="reload"
command_args="-D" # _must_ start as daemon from rc.d;
# add more flags through ${${name}_flags}
+start_precmd="smbd_precmd"
# load_rc_config_var() from /etc/rc.subr on the netbsd-3 branch, for
# the benefit of platforms with older versions of /etc/rc.subr.
@@ -28,6 +29,15 @@ load_rc_config_var()
)' )
}
+smbd_precmd()
+{
+ if ! [ -f /proc/cpuinfo ]; then
+ echo "WARNING: Samba requires a Linux-compatible procfs!"
+ echo "WARNING: Please mount /proc before starting Samba."
+ fi
+}
+
+
load_rc_config $name
load_rc_config_var nmbd nmbd
run_rc_command "$1"
diff --git a/net/samba4/files/winbindd.sh b/net/samba4/files/winbindd.sh
index a2eb808aa86..d8d29f3c0c3 100644
--- a/net/samba4/files/winbindd.sh
+++ b/net/samba4/files/winbindd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: winbindd.sh,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+# $NetBSD: winbindd.sh,v 1.2 2021/06/21 10:23:48 nia Exp $
#
# PROVIDE: winbindd
# REQUIRE: DAEMON
@@ -13,6 +13,15 @@ command="@PREFIX@/sbin/${name}"
pidfile="@SMB_PID@/${name}.pid"
required_files="@SMB_CONFIG@/smb.conf"
extra_commands="reload"
+start_precmd="winbindd_precmd"
+
+winbindd_precmd()
+{
+ if ! [ -f /proc/cpuinfo ]; then
+ echo "WARNING: Samba requires a Linux-compatible procfs!"
+ echo "WARNING: Please mount /proc before starting Samba."
+ fi
+}
load_rc_config $name
run_rc_command "$1"