Test and add mount check
This commit is contained in:
parent
0a576e4e99
commit
54977ac9a1
@ -19,7 +19,7 @@ class VolumeController < ApplicationController
|
|||||||
temp = info[t].split(":")
|
temp = info[t].split(":")
|
||||||
volume[temp[0]] = temp[1]
|
volume[temp[0]] = temp[1]
|
||||||
else
|
else
|
||||||
if df.include? volume['Volume Name']
|
if df.include? volume['Volume Name'].delete(' ')
|
||||||
volume['Mount State'] = "Mounted"
|
volume['Mount State'] = "Mounted"
|
||||||
else
|
else
|
||||||
volume['Mount State'] = "UnMounted"
|
volume['Mount State'] = "UnMounted"
|
||||||
@ -37,7 +37,7 @@ class VolumeController < ApplicationController
|
|||||||
|
|
||||||
def get_df
|
def get_df
|
||||||
@config = get_conf
|
@config = get_conf
|
||||||
return `sshpass -p#{@config["host_password"]} ssh #{@config["host_port"]} #{@config["host_user"]}@#{@config["host_ip"]} df -P`
|
return `df -P`
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_info
|
def get_info
|
||||||
|
Loading…
Reference in New Issue
Block a user