diff --git a/airootfs/etc/systemd/scripts/sysrescue-autorun b/airootfs/etc/systemd/scripts/sysrescue-autorun index 960d0af..f9ee613 100755 --- a/airootfs/etc/systemd/scripts/sysrescue-autorun +++ b/airootfs/etc/systemd/scripts/sysrescue-autorun @@ -127,17 +127,17 @@ def search_autoruns(dirname, suffixes, copyfilefct): def strtobool (val): """Convert a string representation of truth to true (1) or false (0). - True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values - are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if + True values are 'y', 'yes', 't', 'true', 'on', '1', '1.0'; false values + are 'n', 'no', 'f', 'false', 'off', '0', '0.0'. Raises ValueError if 'val' is anything else. Function adapted from Pythons distutils.util.py because it will be deprecated soon Copyright (c) Python Software Foundation; All Rights Reserved """ val = str(val).lower() - if val in ('y', 'yes', 't', 'true', 'on', '1'): + if val in ('y', 'yes', 't', 'true', 'on', '1', '1.0'): return True - elif val in ('n', 'no', 'f', 'false', 'off', '0'): + elif val in ('n', 'no', 'f', 'false', 'off', '0', '0.0'): return False else: raise ValueError("invalid truth value %r" % (val,)) diff --git a/airootfs/etc/systemd/scripts/sysrescue-initialize.py b/airootfs/etc/systemd/scripts/sysrescue-initialize.py index cba4984..4941ea9 100755 --- a/airootfs/etc/systemd/scripts/sysrescue-initialize.py +++ b/airootfs/etc/systemd/scripts/sysrescue-initialize.py @@ -34,17 +34,17 @@ def symlink_overwrite(target, link_file): def strtobool (val): """Convert a string representation of truth to true (1) or false (0). - True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values - are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if + True values are 'y', 'yes', 't', 'true', 'on', '1', '1.0'; false values + are 'n', 'no', 'f', 'false', 'off', '0', '0.0'. Raises ValueError if 'val' is anything else. Function adapted from Pythons distutils.util.py because it will be deprecated soon Copyright (c) Python Software Foundation; All Rights Reserved """ val = str(val).lower() - if val in ('y', 'yes', 't', 'true', 'on', '1'): + if val in ('y', 'yes', 't', 'true', 'on', '1', '1.0'): return True - elif val in ('n', 'no', 'f', 'false', 'off', '0'): + elif val in ('n', 'no', 'f', 'false', 'off', '0', '0.0'): return False else: raise ValueError("invalid truth value %r" % (val,))