add back mountpoint check

This commit is contained in:
Girish Ramakrishnan
2021-06-22 15:28:48 -07:00
parent da6478272d
commit 02263e8921
2 changed files with 7 additions and 2 deletions

View File

@@ -116,7 +116,8 @@ async function getStatus(mountType, hostPath) {
assert.strictEqual(typeof hostPath, 'string');
if (mountType === 'noop' || mountType === 'mountpoint') { // noop is from volume provider and mountpoint is from backup provider
if (safe.child_process.execSync(`mountpoint -q -- ${hostPath}`, { encoding: 'utf8' })) {
safe.child_process.execSync(`mountpoint -q -- ${hostPath}`, { encoding: 'utf8' });
if (!safe.error) {
return { state: 'active', message: 'Mounted' };
} else {
return { state: 'inactive', message: 'Not mounted' };