|
Lines 321-329
Link Here
|
| 321 |
tmpdir = tmpdir + "/diskspace_mount"; |
321 |
tmpdir = tmpdir + "/diskspace_mount"; |
| 322 |
SCR::Execute (.target.bash, sformat ( |
322 |
SCR::Execute (.target.bash, sformat ( |
| 323 |
"test -d %1 || mkdir -p %1", tmpdir)); |
323 |
"test -d %1 || mkdir -p %1", tmpdir)); |
| 324 |
SCR::Execute (.target.bash, sformat ( |
324 |
|
| 325 |
"/bin/mount -o ro %1 %2", |
325 |
// mount in read-only mode (safer) |
| 326 |
part["device"]:"", tmpdir)); |
326 |
list<string> mount_options = ["ro"]; |
|
|
327 |
|
| 328 |
// add "nolock" if it's a NFS share (bnc#433893) |
| 329 |
if (used_fs == `nfs) |
| 330 |
{ |
| 331 |
y2milestone("Mounting NFS with 'nolock' option"); |
| 332 |
mount_options = add(mount_options, "nolock"); |
| 333 |
} |
| 334 |
|
| 335 |
// join the options |
| 336 |
string mount_options_str = mergestring(mount_options, ","); |
| 337 |
|
| 338 |
string mount_command = sformat("/bin/mount -o %1 %2 %3", |
| 339 |
mount_options_str, part["device"]:"", tmpdir); |
| 340 |
|
| 341 |
y2milestone("Executing mount command: %1", mount_command); |
| 342 |
|
| 343 |
SCR::Execute(.target.bash, mount_command); |
| 344 |
|
| 327 |
list<map<string,string> > partition = |
345 |
list<map<string,string> > partition = |
| 328 |
(list<map<string, string> >) |
346 |
(list<map<string, string> >) |
| 329 |
SCR::Read(.run.df); |
347 |
SCR::Read(.run.df); |