]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Support for per service umask settings. This solves the problem with
authorheretyk <heretyk@pld-linux.org>
Thu, 2 Dec 2004 17:43:35 +0000 (17:43 +0000)
committerheretyk <heretyk@pld-linux.org>
Thu, 2 Dec 2004 17:43:35 +0000 (17:43 +0000)
possibly different umask settings when starting services at boot time,
and by hand.

svn-id: @5362

rc.d/init.d/functions

index 882cced0fc7919604718cc074be8c8a9ba835690..bf7409debf0b756fc26c310f8b7a2478300f0c5d 100644 (file)
@@ -490,10 +490,12 @@ daemon()
 
        [ -n "$limits" ] && eval `echo "$limits" | awk 'BEGIN {RS="[\n-]";} !/^ *$/ { printf("ulimit -%s ;", $0); }'`
 
+       [ -z "$DEFAULT_SERVICE_UMASK" ] && DEFAULT_SERVICE_UMASK=022
+
        # And start it up.
        busy
        cd /
-       if errors=$(USER=root HOME=/tmp TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$prog" 2>&1); then
+       if errors=$(umask ${SERVICE_UMASK:-$DEFAULT_SERVICE_UMASK}; USER=root HOME=/tmp TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$prog" 2>&1); then
                if [ -n "$waitname" -a -n "$waittime" ]; then
                        # Save basename.
                        base=$(basename "$waitname")
This page took 0.057371 seconds and 4 git commands to generate.