[Pkg-samba-maint] [Git][samba-team/samba][master] 2 commits: Really ignore nmbd start errors when there is no non-loopback interface (Closes: #893762)

Mathieu Parent gitlab at salsa.debian.org
Tue May 1 19:28:04 BST 2018


Mathieu Parent pushed to branch master at Debian Samba Team / samba


Commits:
26c1eca5 by Mathieu Parent at 2018-04-30T18:25:00+02:00
Really ignore nmbd start errors when there is no non-loopback interface (Closes: #893762)

- - - - -
811596b1 by Mathieu Parent at 2018-05-01T20:26:49+02:00
Ignore nmbd start errors when there is  no local IPv4 non-loopback interface (Closes: #859526)

- - - - -


1 changed file:

- debian/samba.postinst


Changes:

=====================================
debian/samba.postinst
=====================================
--- a/debian/samba.postinst
+++ b/debian/samba.postinst
@@ -3,12 +3,18 @@
 set -e
 
 nmbd_error_handler() {
-    if [ -d /sys/class/net/lo ] && ls /sys/class/net/lo | grep -qv ^lo$; then
+    if [ -d /sys/class/net/lo ] && ls /sys/class/net | grep -qv ^lo$; then
         # https://bugs.debian.org/893762
-        echo 'WARNING: nmbd failed to start as there is no non-loopback interface.'
+        echo 'WARNING: nmbd failed to start as there is no non-loopback interfaces available.'
         echo 'Either add an interface or set "disable netbios = yes" in smb.conf and run "systemctl mask nmbd"'
         return 0
+    elif command -v ip > /dev/null && ip a show | grep '^[[:space:]]*inet ' | grep -vq ' lo$'; then
+        # https://bugs.debian.org/859526
+        echo 'WARNING: nmbd failed to start as there is no local IPv4 non-loopback interfaces available.'
+        echo 'Either add an IPv4 address or set "disable netbios = yes" in smb.conf and run "systemctl mask nmbd"'
+        return 0
     else
+        echo 'ERROR: nmbd failed to start.'
         return 1 # caught by set -e
     fi
 }



View it on GitLab: https://salsa.debian.org/samba-team/samba/compare/f249731b9597256e7449d7d117639b05dec49f16...811596b1694df1956a8c7585dbc766a7de12b254

---
View it on GitLab: https://salsa.debian.org/samba-team/samba/compare/f249731b9597256e7449d7d117639b05dec49f16...811596b1694df1956a8c7585dbc766a7de12b254
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20180501/0cf1b347/attachment.html>


More information about the Pkg-samba-maint mailing list