diff --git a/image/bin/my_init b/image/bin/my_init index a6ded83..05c0b6a 100755 --- a/image/bin/my_init +++ b/image/bin/my_init @@ -20,7 +20,7 @@ LOG_LEVEL_WARN = 1 LOG_LEVEL_INFO = 2 LOG_LEVEL_DEBUG = 3 -SHENV_NAME_WHITELIST_REGEX = re.compile('[^\w\-_\.]') +SHENV_NAME_WHITELIST_REGEX = re.compile('\W') log_level = None @@ -130,6 +130,7 @@ def shquote(s): def sanitize_shenvname(s): + """Return string with [0-9a-zA-Z_] characters""" return re.sub(SHENV_NAME_WHITELIST_REGEX, "_", s)