Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662570 - net-fs/samba add conf.d lockdir variable
Summary: net-fs/samba add conf.d lockdir variable
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-01 08:20 UTC by Forza
Modified: 2018-08-01 08:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2018-08-01 08:20:31 UTC
I think it would be beneficial to have a variable for lockdir in conf.d. 

init.d/samba should check for the lockdir location and create it if missing.

### /etc/init.d/samba
start() {
    ${my_service_PRE}
    [ -d "${piddir}" ] || mkdir -p "${piddir}"
    [ -d "${lockdir}" ] || mkdir -p "${lockdir}"

### /etc/conf.d/samba
daemon_list="smbd nmbd"
piddir="/run/samba"
lockdir="/tmp/samba"
Comment 1 Forza 2018-08-01 08:23:46 UTC
Forgot to mention the accompanying smb.conf line:

### /etc/samba/smb.conf
lock directory = /tmp/samba/locks
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-08-01 08:25:33 UTC
And what if a user chagnes the dir in /etc/samba/smb.conf but not in conf.d?
Comment 3 Forza 2018-08-01 08:32:52 UTC
I suppose it is the same issue as if you write some other error in the config file? For example if you put wrong path to the pidfile in conf.d.

Otherwise, maybe a more complicated way is to check for the "lock files" line, if exists in smb.conf.