Samba não inicia durante o boot (Don't automaticly startup) do Lucid

link: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/462169

 

In file "/etc/init/smbd.conf"

change this:

start on local-filesystems

into this:

start on (local-filesystems and net-device-up IFACE!=lo)

(which is how nmbd is also started, btw).

 

No entanto o que funcionou foi criar um arquivo para reiniciar o samba junto com a interface de rede br0 (no meu caso):

/etc/network/if-up.d/samba

#! /bin/sh
# Reload samba when an interface comes up, to allow it to start
# listening on new addresses.
set -e
# Don't bother to restart samba server when lo is configured.
if [ "$IFACE" = lo ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
# samba server only cares about inet and inet6.
if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
exit 0
fi
# specific interface to listen !!!!
if [ "$IFACE" = br0 ]; then
service smbd restart >/dev/null 2>&1 || true
exit 0
fi
exit 0

Comments