c.f. issue 1274, test at the beginning of postinstall that iptables is working instead of miserably crashing at a later stage

This commit is contained in:
Alexandre Aubin 2020-09-28 20:00:33 +02:00
parent afee23f44a
commit f73ae4eeab

View file

@ -279,6 +279,9 @@ def tools_postinstall(operation_logger, domain, password, ignore_dyndns=False,
else: else:
dyndns = False dyndns = False
if os.system("iptables -V >/dev/null 2>/dev/null") != 0:
raise YunohostError("iptables/nftables does not seems to be working on your setup. You may be in a container or your kernel does have the proper modules loaded. Sometimes, rebooting the machine may solve the issue.", raw_msg=True)
operation_logger.start() operation_logger.start()
logger.info(m18n.n('yunohost_installing')) logger.info(m18n.n('yunohost_installing'))