mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
samba: samba-config: gain exclusive access with flock
This commit is contained in:
parent
8546c5a9aa
commit
401b898ff5
@ -10,6 +10,12 @@ SMB_CONF="/run/samba/smb.conf"
|
||||
|
||||
SMB_DIR=$(dirname ${SMB_CONF})
|
||||
mkdir -p ${SMB_DIR}
|
||||
|
||||
# exclusive access
|
||||
SMB_LOCK="${SMB_DIR}/samba-config.lock"
|
||||
exec 200>"${SMB_LOCK}"
|
||||
flock 200
|
||||
|
||||
SMB_TMP=$(mktemp -p ${SMB_DIR})
|
||||
|
||||
SMB_USERCONF_IS_VALID=no
|
||||
|
Loading…
x
Reference in New Issue
Block a user