[ Agent ] [ App ] - offline build nfs server - 2
This commit is contained in:
@@ -1098,6 +1098,9 @@ func (op *AgentOsOperator) installNfsOnlineExec() (bool, []string) {
|
|||||||
|
|
||||||
func (op *AgentOsOperator) installNFSOfflineExec() (bool, []string) {
|
func (op *AgentOsOperator) installNFSOfflineExec() (bool, []string) {
|
||||||
|
|
||||||
|
log.InfoF("[installNFSOfflineExec] - start to install nfs-client offline !")
|
||||||
|
BasicCreateFolder("/root/install")
|
||||||
|
|
||||||
// check for version
|
// check for version
|
||||||
executor, i := HardCodeCommandExecutor("grep PRETTY_NAME /etc/os-release | cut -d= -f2 | tr -d '\"' | sed 's/ /-/g'")
|
executor, i := HardCodeCommandExecutor("grep PRETTY_NAME /etc/os-release | cut -d= -f2 | tr -d '\"' | sed 's/ /-/g'")
|
||||||
if !executor {
|
if !executor {
|
||||||
@@ -1121,13 +1124,15 @@ func (op *AgentOsOperator) installNFSOfflineExec() (bool, []string) {
|
|||||||
"/root/install",
|
"/root/install",
|
||||||
})
|
})
|
||||||
|
|
||||||
// install
|
|
||||||
AllCommandExecutor([]string{
|
AllCommandExecutor([]string{
|
||||||
"dpkg",
|
"rm",
|
||||||
"-i",
|
"-rf",
|
||||||
"/root/install/tmp/nfs-client/*.deb",
|
"/root/install/tmp",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// install
|
||||||
|
BasicPrettyPrint(HardCodeCommandExecutor("dpkg -i /root/install/tmp/nfs-client/*.deb"))
|
||||||
|
|
||||||
ok, resultLog = BasicSystemdUp("nfs")
|
ok, resultLog = BasicSystemdUp("nfs")
|
||||||
if !ok {
|
if !ok {
|
||||||
return false, append(resultLog, "[installNFSOfflineExec] - start nfs-common.service failed !")
|
return false, append(resultLog, "[installNFSOfflineExec] - start nfs-common.service failed !")
|
||||||
|
|||||||
Reference in New Issue
Block a user