mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
fsmounter: fix unused options1 for cifs
Origin commit data
------------------
Commit: 29d46e058d
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-15 (Sat, 15 May 2021)
Origin message was:
------------------
- fsmounter: fix unused options1 for cifs
This commit is contained in:
@@ -178,7 +178,6 @@ bool CFSMounter::isMounted(const std::string &local_dir)
|
|||||||
MountInfo mi;
|
MountInfo mi;
|
||||||
in >> mi.device >> mi.mountPoint >> mi.type;
|
in >> mi.device >> mi.mountPoint >> mi.type;
|
||||||
|
|
||||||
//NI
|
|
||||||
if (mi.type == "tmpfs")
|
if (mi.type == "tmpfs")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -229,8 +228,8 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
|
|||||||
{
|
{
|
||||||
if (fstype == NFS)
|
if (fstype == NFS)
|
||||||
{
|
{
|
||||||
options1 = "soft"; //NI
|
options1 = "soft";
|
||||||
options2 = "nolock"; //NI
|
options2 = "nolock";
|
||||||
}
|
}
|
||||||
else if (fstype == CIFS)
|
else if (fstype == CIFS)
|
||||||
{
|
{
|
||||||
@@ -252,8 +251,6 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
|
|||||||
cmd += dir;
|
cmd += dir;
|
||||||
cmd += ' ';
|
cmd += ' ';
|
||||||
cmd += local_dir;
|
cmd += local_dir;
|
||||||
cmd += " -o ";
|
|
||||||
cmd += options1;
|
|
||||||
}
|
}
|
||||||
else if (fstype == CIFS)
|
else if (fstype == CIFS)
|
||||||
{
|
{
|
||||||
@@ -267,12 +264,6 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
|
|||||||
cmd += username;
|
cmd += username;
|
||||||
cmd += ",password=";
|
cmd += ",password=";
|
||||||
cmd += password;
|
cmd += password;
|
||||||
//cmd += ",unc=//"; for whats needed?
|
|
||||||
//cmd += ip;
|
|
||||||
//cmd += '/';
|
|
||||||
//cmd += dir;
|
|
||||||
//cmd += ',';
|
|
||||||
//cmd += options1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -286,11 +277,18 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
|
|||||||
cmd += ip;
|
cmd += ip;
|
||||||
cmd += ",root=/";
|
cmd += ",root=/";
|
||||||
cmd += dir;
|
cmd += dir;
|
||||||
cmd += ',';
|
}
|
||||||
|
|
||||||
|
if (!options1.empty())
|
||||||
|
{
|
||||||
|
if (fstype == NFS)
|
||||||
|
cmd += " -o ";
|
||||||
|
else
|
||||||
|
cmd += ',';
|
||||||
cmd += options1;
|
cmd += options1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options2[0] != '\0')
|
if (!options2.empty())
|
||||||
{
|
{
|
||||||
cmd += ',';
|
cmd += ',';
|
||||||
cmd += options2;
|
cmd += options2;
|
||||||
|
Reference in New Issue
Block a user