pmb: display note when chroot is still active

It is unexpected for quite a lot of people, that the chroot folders are
still mounted when a pmbootstrap command has finished. With this commit,
it will let the user know explicitly:

> NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)

Close #1524
This commit is contained in:
Oliver Smith 2018-07-09 22:56:06 +02:00
parent 2b062a1272
commit 3631d314d4
1 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,7 @@ from . import parse
from .config import init as config_init
from .helpers import frontend
from .helpers import logging as pmb_logging
from .helpers import mount
from .helpers import other
@ -62,7 +63,10 @@ def main():
else:
logging.info("Run pmbootstrap -h for usage information.")
# Print finish timestamp
# Still active notice
if mount.ismount(args.work + "/chroot_native/dev"):
logging.info("NOTE: chroot is still active (use 'pmbootstrap"
" shutdown' as necessary)")
logging.info("Done")
except Exception as e: