package/samba: use FHS dirs

Clean up system directories by making samba conform to FHS and by using
subdirectories e.g. /var/log/samba and /var/run/samba instead of
/var/log and /var/run.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Maxim Mikityanskiy 2015-01-19 18:14:11 +02:00 committed by Thomas Petazzoni
parent 97eeb54598
commit 7105393e4c
2 changed files with 8 additions and 7 deletions

View File

@ -10,6 +10,7 @@
mkdir -p /var/cache/samba
mkdir -p /var/log/samba
mkdir -p /var/lock/subsys
mkdir -p /var/run/samba
RETVAL=0
@ -33,13 +34,13 @@ stop() {
echo -n "Shutting down SMB services: "
kill -9 `pidof smbd`
RETVAL=$?
rm -f /var/run/smbd.pid
rm -f /var/run/samba/smbd.pid
echo "done"
echo -n "Shutting down NMB services: "
kill -9 `pidof nmbd`
RETVAL2=$?
rm -f /var/run/nmbd.pid
rm -f /var/run/samba/nmbd.pid
[ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
echo "done"

View File

@ -33,11 +33,11 @@ SAMBA_CONF_ENV = \
$(if $(BR2_PACKAGE_SAMBA_AVAHI),AVAHI_LIBS=-pthread)
SAMBA_CONF_OPTS = \
--with-piddir=/var/run \
--with-lockdir=/var/lock \
--with-logfilebase=/var/log \
--with-configdir=/etc/samba \
--with-privatedir=/etc/samba \
--with-fhs \
--with-piddir=/var/run/samba \
--with-lockdir=/var/cache/samba \
--with-ncalrpcdir=/var/run/ncalrpc \
--with-nmbdsocketdir=/var/run/nmbd \
\
--disable-cups \
--enable-shared-libs \