catch some common error cases
This commit is contained in:
1 parent
615bb0d4ba
commit
55f405a2b4
1 file changed
+2
-2
@@ -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