use /var/tmp instead of /tmp
Also add a --tmp option so users can specify a top level tmp dir.
This commit is contained in:
parent
a83c8c1df0
commit
2b8075af3a
@ -146,7 +146,7 @@ class RuntimeBuilder(object):
|
|||||||
runcmd(["depmod", "-a", "-F", ksyms, "-b", root, kver])
|
runcmd(["depmod", "-a", "-F", ksyms, "-b", root, kver])
|
||||||
generate_module_info(moddir+kver, outfile=moddir+"module-info")
|
generate_module_info(moddir+kver, outfile=moddir+"module-info")
|
||||||
|
|
||||||
def create_runtime(self, outfile="/tmp/squashfs.img", compression="xz", compressargs=[], size=1):
|
def create_runtime(self, outfile="/var/tmp/squashfs.img", compression="xz", compressargs=[], size=1):
|
||||||
# make live rootfs image - must be named "LiveOS/rootfs.img" for dracut
|
# make live rootfs image - must be named "LiveOS/rootfs.img" for dracut
|
||||||
workdir = joinpaths(os.path.dirname(outfile), "runtime-workdir")
|
workdir = joinpaths(os.path.dirname(outfile), "runtime-workdir")
|
||||||
if size:
|
if size:
|
||||||
|
@ -109,6 +109,8 @@ def main(args):
|
|||||||
action="store_false", default=True, dest="domacboot")
|
action="store_false", default=True, dest="domacboot")
|
||||||
optional.add_option("--logfile", default="./lorax.log",
|
optional.add_option("--logfile", default="./lorax.log",
|
||||||
help="Path to logfile")
|
help="Path to logfile")
|
||||||
|
optional.add_option("--tmp", default="/var/tmp",
|
||||||
|
help="Top level temporary directory" )
|
||||||
|
|
||||||
# add the option groups to the parser
|
# add the option groups to the parser
|
||||||
parser.add_option_group(required)
|
parser.add_option_group(required)
|
||||||
@ -142,6 +144,8 @@ def main(args):
|
|||||||
|
|
||||||
setup_logging(opts)
|
setup_logging(opts)
|
||||||
|
|
||||||
|
tempfile.tempdir = opts.tmp
|
||||||
|
|
||||||
# create the temporary directory for lorax
|
# create the temporary directory for lorax
|
||||||
tempdir = tempfile.mkdtemp(prefix="lorax.", dir=tempfile.gettempdir())
|
tempdir = tempfile.mkdtemp(prefix="lorax.", dir=tempfile.gettempdir())
|
||||||
|
|
||||||
@ -169,7 +173,7 @@ def main(args):
|
|||||||
|
|
||||||
|
|
||||||
def get_yum_base_object(installroot, repositories, mirrorlists=[],
|
def get_yum_base_object(installroot, repositories, mirrorlists=[],
|
||||||
tempdir="/tmp", proxy=None, excludepkgs=[]):
|
tempdir="/var/tmp", proxy=None, excludepkgs=[]):
|
||||||
|
|
||||||
def sanitize_repo(repo):
|
def sanitize_repo(repo):
|
||||||
if repo.startswith("/"):
|
if repo.startswith("/"):
|
||||||
|
Loading…
Reference in New Issue
Block a user