fix unmount issus when dir is not mount #1
|
@ -234,7 +234,7 @@ class RootFS::RootFS
|
||||||
|
|
||||||
def unmount(directory = nil)
|
def unmount(directory = nil)
|
||||||
if directory
|
if directory
|
||||||
execute "umount '#{@directory}/#{directory}'"
|
execute "mountpoint -q '#{@directory}/#{directory}' || exit 0 && umount '#{@directory}/#{directory}'"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue