Check if /proc is mounted (#741722)
Needed for proper functionality in chroot, so if it is not there, exit before doing anything.
This commit is contained in:
parent
af6d4e2c50
commit
049d73874c
@ -170,6 +170,13 @@ class Lorax(BaseLoraxClass):
|
|||||||
logger.critical("no root privileges")
|
logger.critical("no root privileges")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# check if /proc is mounted
|
||||||
|
logger.info("checking /proc")
|
||||||
|
if (not os.path.isdir("/proc") and not os.path.exists("/proc/mounts")
|
||||||
|
and not os.path.exists("/proc/devices")):
|
||||||
|
logger.critical("missing required /proc files (not mounted?)")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# do we have all lorax required commands?
|
# do we have all lorax required commands?
|
||||||
self.lcmds = constants.LoraxRequiredCommands()
|
self.lcmds = constants.LoraxRequiredCommands()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user