setup: properly detect is_chroot on Btrfs (#55089)

* setup: properly detect is_chroot on Btrfs

Fixes #55006

* Use get_bin_path for stat

* Remove comment
This commit is contained in:
Martin Krizek 2019-04-11 11:24:08 +02:00 committed by GitHub
parent cd00934375
commit a40c1ed811
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View file

@ -508,7 +508,7 @@ def main():
if rc != 0:
module.fail_json(msg="Unable to %s service %s: %s" % (action, unit, err))
# check for chroot
elif is_chroot():
elif is_chroot(module):
module.warn("Target is a chroot. This can lead to false positives or prevent the init system tools from working.")
else:
# this should not happen?