1 diff --git a/lib/functions b/lib/functions
2 index 8d018f7..f9538d2 100644
5 @@ -690,13 +690,12 @@ _daemon_exec() {
10 - if [ "$makepid" ] && [ "$pidfile" ]; then
11 - export PIDFILE="$pidfile"
12 - set -- /lib/rc-scripts/makepid "$@"
15 if [ "$fork" = "1" ]; then
16 + export PIDFILE="/dev/null"
17 + if [ "$makepid" ] && [ "$pidfile" ]; then
18 + export PIDFILE="$pidfile"
20 + set -- /lib/rc-scripts/makepid "$@"
21 set -- /usr/bin/setsid "$@"
23 if [ -n "$user" -a "$user" != "root" ]; then
24 @@ -1009,7 +1008,7 @@ pidofproc() {
27 # Next try "pidof" if pidfile is not specified
28 - if [ -z "$pid" ] && [ -z "$pidfile" ]; then
29 + if [ -z "$pid" ] && [ -z "$2" ]; then
30 pid=$(pidof -o $$ -o $PPID -o %PPID -x "$1")
33 commit bf42a4fb7c71c31954499bf9cbce4548305afe80
34 Author: Arkadiusz MiĆkiewicz <arekm@maven.pl>
35 Date: Tue Jun 7 17:09:48 2016 +0200
37 Mount /run as mode=0755,noexec,nosuid,nodev.
39 diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
40 index f7f0eea..99bb078 100755
43 @@ -409,7 +409,7 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
47 - is_fsmounted tmpfs /run || mount -n -t tmpfs run /run
48 + is_fsmounted tmpfs /run || mount -n -t tmpfs run /run -o mode=0755,noexec,nosuid,nodev
52 @@ -680,7 +680,7 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
53 mount -f -t devtmpfs devtmpfs /dev 2> /dev/null
55 if is_fsmounted tmpfs /run; then
56 - mount -f -t tmpfs run /run 2> /dev/null
57 + mount -f -t tmpfs run /run -o mode=0755,noexec,nosuid,nodev 2> /dev/null
60 if is_fsmounted usbfs /proc/bus/usb; then