catch some common error cases
This commit is contained in:
@@ -27,8 +27,8 @@ class Foreman::Export::Inittab < Foreman::Export::Base
|
|||||||
inittab = inittab.join("\n") + "\n"
|
inittab = inittab.join("\n") + "\n"
|
||||||
|
|
||||||
if fname
|
if fname
|
||||||
FileUtils.mkdir_p(log_root)
|
FileUtils.mkdir_p(log_root) rescue error "could not create #{log_root}"
|
||||||
FileUtils.chown(user, nil, log_root)
|
FileUtils.chown(user, nil, log_root) rescue error "could not chown #{log_root} to #{user}"
|
||||||
write_file(fname, inittab)
|
write_file(fname, inittab)
|
||||||
else
|
else
|
||||||
puts inittab
|
puts inittab
|
||||||
|
|||||||
Reference in New Issue
Block a user