aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2020-04-30 21:29:09 +0200
committerHans Dedecker <dedeckeh@gmail.com>2020-04-30 21:51:12 +0200
commitad27c133eb606ee39fa346b7bdb26c1764ee869e (patch)
tree1f8cfd9655558725a287ffb392caa65f7c9d618b /package
parent2855be31510f7defe99f4c01fb0639b8fdf9c69f (diff)
downloadupstream-ad27c133eb606ee39fa346b7bdb26c1764ee869e.tar.gz
upstream-ad27c133eb606ee39fa346b7bdb26c1764ee869e.tar.bz2
upstream-ad27c133eb606ee39fa346b7bdb26c1764ee869e.zip
base-files: generate config files with correct permissions
As touch creates files with permission 0644 use umask to create config files with permission 0600 to be inline with INSTALL_CONF Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/bin/config_generate2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index 3bf48d7216..abb1388ba1 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -426,6 +426,8 @@ generate_gpioswitch() {
json_init
json_load "$(cat ${CFG})"
+umask 077
+
if [ ! -s /etc/config/network ]; then
touch /etc/config/network
generate_static_network