[mw-devel] [Git][arthur/mw][master] Always set permissions on /var/run/mw in init script

Tom Lake tswsl1989 at sucs.org
Sat Feb 27 19:54:12 GMT 2016


Tom Lake pushed to branch master at Justin Mitchell / mw


Commits:
d32634c2 by Thomas Lake at 2016-02-27T19:54:11+00:00
Always set permissions on /var/run/mw in init script

- - - - -


1 changed file:

- mwserv.init


Changes:

=====================================
mwserv.init
=====================================
--- a/mwserv.init
+++ b/mwserv.init
@@ -44,10 +44,13 @@ do_start()
 {
 	# check if the mw folder in /var/run exists, if not then make it
 	if [ ! -d /var/run/mw ]; then
-	mkdir /var/run/mw
-	chown mw:mw /var/run/mw
+		mkdir /var/run/mw
 	fi
 
+	# Occasionally /var/run/mw ends up with the wrong permissions
+	# Running this unconditionally should ensure that we always have ownership
+	chown mw:mw /var/run/mw
+
 	# Return
 	#   0 if daemon has been started
 	#   1 if daemon was already running



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/d32634c20d5c1e05b36dddfcdf3fdcea6da270a7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160227/0a53832a/attachment.html>


More information about the mw-devel mailing list