pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/samba4 samba4: Warn before starting if procfs is n...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9270e166865a
branches:  trunk
changeset: 454806:9270e166865a
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Jun 21 10:23:48 2021 +0000

description:
samba4: Warn before starting if procfs is not mounted on NetBSD...

diffstat:

 net/samba4/Makefile          |   3 ++-
 net/samba4/files/nmbd.sh     |  11 ++++++++++-
 net/samba4/files/samba.sh    |  11 ++++++++++-
 net/samba4/files/smbd.sh     |  12 +++++++++++-
 net/samba4/files/winbindd.sh |  11 ++++++++++-
 5 files changed, 43 insertions(+), 5 deletions(-)

diffs (132 lines):

diff -r e62d5722a96a -r 9270e166865a net/samba4/Makefile
--- a/net/samba4/Makefile       Mon Jun 21 10:09:10 2021 +0000
+++ b/net/samba4/Makefile       Mon Jun 21 10:23:48 2021 +0000
@@ -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 -r e62d5722a96a -r 9270e166865a net/samba4/files/nmbd.sh
--- a/net/samba4/files/nmbd.sh  Mon Jun 21 10:09:10 2021 +0000
+++ b/net/samba4/files/nmbd.sh  Mon Jun 21 10:23:48 2021 +0000
@@ -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 @@
 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 -r e62d5722a96a -r 9270e166865a net/samba4/files/samba.sh
--- a/net/samba4/files/samba.sh Mon Jun 21 10:09:10 2021 +0000
+++ b/net/samba4/files/samba.sh Mon Jun 21 10:23:48 2021 +0000
@@ -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 @@
 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 -r e62d5722a96a -r 9270e166865a net/samba4/files/smbd.sh
--- a/net/samba4/files/smbd.sh  Mon Jun 21 10:09:10 2021 +0000
+++ b/net/samba4/files/smbd.sh  Mon Jun 21 10:23:48 2021 +0000
@@ -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 @@
 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 @@
        )' )
 }
 
+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 -r e62d5722a96a -r 9270e166865a net/samba4/files/winbindd.sh
--- a/net/samba4/files/winbindd.sh      Mon Jun 21 10:09:10 2021 +0000
+++ b/net/samba4/files/winbindd.sh      Mon Jun 21 10:23:48 2021 +0000
@@ -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 @@
 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"



Home | Main Index | Thread Index | Old Index