aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2013-07-16 00:28:30 +0200
committerAndré Erdmann <dywi@mailerd.de>2013-07-16 00:28:30 +0200
commit39d0fc71190b45813be08386c638bb49e1827454 (patch)
tree43ae1162bd2b9cc598025a19afccc48a6c02890d
parentdependency rules #1 (diff)
downloadR_overlay-39d0fc71190b45813be08386c638bb49e1827454.tar.gz
R_overlay-39d0fc71190b45813be08386c638bb49e1827454.tar.bz2
R_overlay-39d0fc71190b45813be08386c638bb49e1827454.zip
roverlay/config/defconfig: set EVENT_HOOK_RESTRICT
-rw-r--r--roverlay/config/defconfig.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/roverlay/config/defconfig.py b/roverlay/config/defconfig.py
index 7ae0d5b..9e0f336 100644
--- a/roverlay/config/defconfig.py
+++ b/roverlay/config/defconfig.py
@@ -69,16 +69,22 @@ class ConfigOption ( object ):
self.append_newline = append_newline
self.value = None
self.defaults_to = defaults_to
+
+ #self.is_set = False
# --- end of __init__ (...) ---
+ def set_value ( self, value ):
+ self.value = value
+ #self.is_set = True
+
def gen_str ( self ):
entry = self.map_entry[1]
if self.value is None:
using_default = True
self.value = self.default
- elif self.value == self.default:
- using_default = True
+# elif self.value == self.default:
+# using_default = True
else:
using_default = False
@@ -198,8 +204,8 @@ class RoverlayConfigCreation ( object ):
except ( TypeError, ValueError ):
raise ConfigValueError ( key, value )
- if converted_value:
- option.value = svalue
+ if converted_value is not None:
+ option.set_value ( svalue )
else:
raise ConfigValueError ( key, value )
pass
@@ -279,8 +285,12 @@ class RoverlayConfigCreation ( object ):
'EVENT_HOOK', datadir ( 'hooks/mux.sh' ),
),
ConfigOption (
- 'EVENT_HOOK_RESTRICT', '-* overlay_success',
- comment_default=True, required=False,
+ 'EVENT_HOOK_RESTRICT', '-* overlay_success user',
+ description=(
+ 'Note:',
+ ' setting -user is highly recommended when running roverlay as root',
+ ),
+ comment_default=False, required=False,
defaults_to=( "*", "allow all" ),
),
ConfigOption (