final String path = PATH_ARG.getValue();
final String user = USERNAME_ARG.getValue();
final String password = PASSWORD_ARG.getValue();
final FileSystemService fss = InitialNaming.lookup(FileSystemService.NAME);
SMBFileSystemType type = fss.getFileSystemType(SMBFileSystemType.ID);
final SMBFSDevice dev = new SMBFSDevice(host, path, user, password);
dev.setDriver(new SMBFSDriver());
final DeviceManager dm = DeviceUtils.getDeviceManager();
dm.register(dev);
// This controls whether we attempt to undo the effects of the command
// e.g. when the 'mount' step fails.
boolean ok = false;
try {
final SMBFileSystem fs = type.create(dev, true);
fss.registerFileSystem(fs);
try {
fss.mount(mountPoint.toString(), fs, null);
ok = true;
} finally {